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

Get all rows from all pages client side

1 Answer 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sébastien
Top achievements
Rank 1
Sébastien asked on 03 Jun 2016, 01:15 PM

Hello,

does the method "get_masterTableView()" only return the rows from the active page ? If yes, how iterate on all rows from all pages from the grid ?

The grid contains 60 rows in 3 pages. The instruction "rows.length" below return 20. I need 60.

Has someone an idea ?

Thanks in advance.

Seb

var tableView = $find("grdMandantenList").get_masterTableView();
var rows = tableView.get_dataItems();
for (var i = 0; i < rows.length; i++) {
   //access label value
   var label = rows[i].findElement("lblVersandStatus");
   ...
}

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 08 Jun 2016, 08:48 AM
Hi Seb,

The items returned by the get_dataItems() method are only the items that are visible on the client. This is why you are seeing only 20 items.

With that said, would you elaborate in more detail on the scenario you would like to implement? Why do you need to access all items in the grid? What are the requirements and what should be the expected result?


Regards,
Viktor Tachev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Sébastien
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or