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

[Solved] How to preserve the state of the rows selected during traversal to other pages

3 Answers 260 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sunil Nahar
Top achievements
Rank 1
Sunil Nahar asked on 09 Sep 2009, 07:35 AM
Hi,

I am using a GridClientSelectColumn and have a paging on my grid. I need following things on my grid.

1) Multiple selection client-side
2) If i do select all from the header checkbox on page1, it should also select the rows at all other pages.
3) Deselect should deselect only the single row, not all.
4) If i select a single row on page1, and move on to any other page and now when i come back to page1 the row should persist its state.

I would appreciate any help on this.

Thanks,
Sunil Nahar.

3 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 09 Sep 2009, 07:53 AM
Hi Sunil,

Please check this article for more info:
http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html

Regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Sunil Nahar
Top achievements
Rank 1
answered on 09 Sep 2009, 08:23 AM
Thanks Vlad for such a quick reply. Your solution for the state persistence, worked great. but when i hit the select all checkbox at the header first thing it does not select all the rows in the grid, i mean all the rows of all the pages. And second thing it does not preserve its own state, i mean when i come back to page 1, after selecting all the rows on page 1 and moving on to some other page, it keeps all the rows selected but the header checkbox is still unchecked.

And talking about handling the selection of rows in my edit scenario, how would i achieve that?

I really appreciate your help.

Sunil.
0
Yavor
Telerik team
answered on 14 Sep 2009, 04:53 AM
Hi Sunil,

The selection is handled on a per-page basis. If you would like to handle the selection for the whole grid, you can consider removing paging. Additionally, when preserving the state of the selected items, you can also restore the state for the checkbox in the header, when paging.
I hope these suggestions help.

Kind regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Sunil Nahar
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Sunil Nahar
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or