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

How to deselect a row upon filter change

1 Answer 14 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 29 Jul 2011, 03:42 PM
I have a radgrid that uses a user control for editing the selected row details...

When I have a row selected, let's say the 2nd item on my grid, and then modify a column filter, the 2nd item on my newly filtered grid is still in edit mode (assuming the updated grid has at least 2 items).

The expected behavior for this (at least for me) would be to have any preivously selected items become cleared upon filter change.

I've seen posts that explain how to un-select items upon re-sort and adding new items, but not for my particular case. 

Please help.  Thanks.

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 03 Aug 2011, 08:48 PM
Hi,

I could not fully understand whether the row is selected or put in edit mode from your description. However, if you do not want it to persist its state, you could wire the ItemCommand server event of RadGrid and clear the RadGrid.EditIndexes and/or RadGrid.SelectedIndexes collection when the CommandName is RadGrid.FilterCommandName

Best wishes,
Tsvetina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
JJ
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or