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

Getting Grid Column values irrespective of paging

4 Answers 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
A2H
Top achievements
Rank 1
A2H asked on 14 Jul 2010, 04:21 PM
Hi,
   
In telerik grid I have six columns,and grid have 1000+ records.Suppose a user select 10 records from this .I want to have a validation in which user had selected right columns or not.For this I have to Get the vlaue of 3 rd column from grid for the selected records and have check  and based on the result i have to show a message.

For selecting row i am using client select column

             var grid = $find("<%=GridName.ClientID %>");
             var MasterTable = grid.get_masterTableView();
                 for (var intcount = 0; intcount < MasterTable.get_selectedItems().length; intcount++)
                {
                    var row = MasterTable.get_selectedItems()[intcount];
                    var FieldValue = MasterTable.getCellByColumnUniqueName(row, "ColumnName").innerHTML;
               }

Problem I am facing is : If the selected column is in different page(Paging) then I am not able to get the reference of that.
its giving me index out of bound exception.

How can we get the selected column values irrespective of paging

Please help me.

Thanks
A2H

4 Answers, 1 is accepted

Sort by
0
A2H
Top achievements
Rank 1
answered on 15 Jul 2010, 06:49 AM
Please help me its very urgent .

Thanks,
A2H
0
Tsvetoslav
Telerik team
answered on 16 Jul 2010, 08:56 AM
Hi,

I am afraid if you are using paging you won't be able to get the selected rows from pages other than the current one. What you have to do is for each selection to persist the required information and then use it as per your scenario. For example, if you are using ajax, you can employee a javscript array or object to persist the data.

Hope it helps.

Best wishes,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
A2H
Top achievements
Rank 1
answered on 22 Jul 2010, 06:11 AM
Can u be little more specific.I am not getting what you meant by implementation in array.

and a small qs.Why this feature is not supported in telerik.I think lots of people will face this task to loop through entire gird,Instead of  current page.

Please take this into consideration when u give the next version of telerik controls.
Thanks,
A2H
0
Tsvetoslav
Telerik team
answered on 22 Jul 2010, 02:13 PM
Hello A2H,

The following help article explains how to persist the grid's row selected state on paging and sorting:
http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html

In an analogous way, you can do so for any information pertaining to the grid items including the data contained in them.

As for your second question - this has been implemented by design, as keeping all the grid's records in memory and rendering them to the browser will lead to quite a bit of performance slow down whenever the control is bound to a considerable number of rows.

Regards,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
A2H
Top achievements
Rank 1
Answers by
A2H
Top achievements
Rank 1
Tsvetoslav
Telerik team
Share this question
or