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

How to remeber row selection during paging

3 Answers 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shannnon
Top achievements
Rank 1
Shannnon asked on 16 Mar 2011, 11:42 PM
I am using RadGrid for AJAX, I cannot reserve row selection and status during paging, selected rows are deselected after leaving current page, the sample online has the same issue with both client-side and server-side selection. I am using client-side selection by the way. Any suggestions?

Thanks in advance!

Shan

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Mar 2011, 05:29 AM
Hello Shannon,

You can refer the following documentation which shows how to persist the selected rows on paging.
Persisting the selected rows client-side on sorting/paging/filtering/grouping

Thanks,
Princy.
0
Shannnon
Top achievements
Rank 1
answered on 18 Mar 2011, 07:45 PM
Thank you, it almost works, except the gridHeader is always undefined, so the childNodes are null all the time too. I think

var

 

 

gridHeader = masterTable.get_element().getElementsByTagName("th")[0], is trying to find following "th"

 

   
<th scope="col" class="rgHeader rgExpandCol"> </th><th scope="col" class="rgHeader rgCheck" style="text-align:center;">
<
input id="RadGrid1_ctl00_ctl02_ctl02_ClientSelectColumnSelectCheckBox" type="checkbox" name="RadGrid1$ctl00$ctl02$ctl02$ClientSelectColumnSelectCheckBox" onclick="$find("RadGrid1")._selectAllRows("RadGrid1_ctl00", "", event);" /></th>
<
th scope="col" class="rgHeader">ID</th><th scope="col" class="rgHeader">column1</th>
<
th scope="col" class="rgHeader" style="display:none;">column2</th>............
  but it cannot, please help me.

Thanks!!
0
Iana Tsolova
Telerik team
answered on 24 Mar 2011, 08:50 AM
Hello Shannnon,

You can try debugging and see what masterTable.get_element() returns.
However, if the grid grid has scrolling enabled, I would suggest that you use the below method to get reference to the header:
http://www.telerik.com/help/aspnet-ajax/grid-get-mastertableviewheader.html

All the best,
Iana
the Telerik team
Tags
Grid
Asked by
Shannnon
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Shannnon
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or