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

Get Select Rows from RadGrid with paging enabled

4 Answers 334 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Phaneendra
Top achievements
Rank 1
Phaneendra asked on 10 Jun 2013, 06:58 AM
Hi,

I have a rad grid with paging enabled, and i got records displayed in two pages.
Using client script I'm working for selecting/deselecting the rows using checking box and also persisted the check box while paging.
But when I'm trying to read selected rows in rad grid I'm getting only current page records, but not all pages selected records.

Please help me in that regards.

Thanks & Regards
Phaneendra

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Jun 2013, 07:43 AM
0
Smitha
Top achievements
Rank 1
answered on 25 Sep 2014, 11:45 AM
function GridCreated(sender, eventArgs) {
var masterTable = sender.get_masterTableView();
var selectColumn = masterTable.getColumnByUniqueName("SelectColumnID");
var headerCheckBox = $(selectColumn.get_element()).find("[type=checkbox]")[0];

if (headerCheckBox) {
headerCheckBox.checked = masterTable.get_selectedItems().length ==
masterTable.get_dataItems().length;
}
}
0
Smitha
Top achievements
Rank 1
answered on 25 Sep 2014, 11:47 AM
what is the use of the following code
Persisting the Selected Rows Client-side on Sorting/Paging/Filtering/Grouping

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

function GridCreated(sender, eventArgs) {
var masterTable = sender.get_masterTableView();
var selectColumn = masterTable.getColumnByUniqueName("SelectColumnID");
var headerCheckBox = $(selectColumn.get_element()).find("[type=checkbox]")[0];

if (headerCheckBox) {
headerCheckBox.checked = masterTable.get_selectedItems().length ==
masterTable.get_dataItems().length;
}
}
0
Eyup
Telerik team
answered on 30 Sep 2014, 10:15 AM
Hi Smitha,

This logic will handle the SelectAll header checkbox state which becomes visible once the AllowMultiRowSelection property is enabled. I'm also attaching a more advanced implementation of the approach demonstrated in the mentioned article.

Hope this helps.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Phaneendra
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Smitha
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or