This is a migrated thread and some comments may be shown as answers.

Close User Control Edit Form

2 Answers 130 Views
Grid
This is a migrated thread and some comments may be shown as answers.
baharris
Top achievements
Rank 1
baharris asked on 07 Jul 2008, 03:16 PM
I have a rad grid with multiple template columns with dropdown filtering controls. I have a custom user control for the edit form. Everything works fine except when I filter without manully closing my edit control. I know what it is doing but I just cannot figure out a fix for it. I want to be able to close the editable item that is open whenever I do a new filter on the grid. It was giving me the same problem when I would change pages in the grid but I fixed that by adding MasterTableView.ClearEditItems() in the PageSelectedIndexChange procedure. How can I use this for my filtering? I get the below error when filtering:

Specified argument was out of the range of valid values. Parameter name: ItemHierarchicalIndex

Thanks,
Blake

2 Answers, 1 is accepted

Sort by
0
Accepted
Veli
Telerik team
answered on 08 Jul 2008, 01:21 PM
Hi Blake,

You can place the RadGrid.MasterTableView.ClearEditItems() piece in the filter command in the following way:

void RadGrid1_ItemCommand(object source, Telerik.WebControls.GridCommandEventArgs e) 
    if (e.CommandName == RadGrid.FilterCommandName) 
    { 
        RadGrid1.MasterTableView.ClearEditItems(); 
    } 


All the best,
Veli
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
baharris
Top achievements
Rank 1
answered on 08 Jul 2008, 08:27 PM
Thanks! It worked great!
Tags
Grid
Asked by
baharris
Top achievements
Rank 1
Answers by
Veli
Telerik team
baharris
Top achievements
Rank 1
Share this question
or