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

[Solved] Why does RadGrid find items?

1 Answer 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex R.
Top achievements
Rank 1
Alex R. asked on 23 Jul 2009, 05:40 PM
Hello.

Could you help me to fix problem finding items in grid?
I use RadGrid with pagination to display table information.
A simple binding approach is used. So I have to rebing grid every time after the grids operations are called: paging/sorting/grouping.
I have a list of selected items(DataKeyNames) were selected by user. The restoring performs on Item_Bound event.
Step to reproduce incorrect situation:
1. Select one item in 1 page.
2. Move to second page. The Item_Bound event is fired.
The grid finds item which was selected on first page.  After that selects founded item.
But this item was on the first page. Why does grid find it?
3. Grid displays the second page.There is no exist selected item. 
4. Move to third page. The grid does not find item which was selected on first page.

I think the grid shouldn't find item if this item does not exist on the curent page. Am I right?
Why does grid find item when page is first time post back, and does not find when page is second time postback?

Thanks.
Alex.






1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 28 Jul 2009, 02:43 PM
Hello Alex,

Based on your description, I assume that you would like to persist the selected items in the grid when navigating between pages. If this is the case, I recommend you use advanced binding with NeedDataSource event handling and choose one of the techniques discussed in the documentation topics pointed below:

http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html
http://www.telerik.com/help/aspnet-ajax/grdpersistselectedrowsonsorting.html

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Alex R.
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or