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

Grid row iteration of a single page

1 Answer 762 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Atanu
Top achievements
Rank 1
Atanu asked on 15 Oct 2012, 06:06 AM
Hi

Is there any way I can loop through the rows for a particular page or at least the page visible to the user.
What am I doing right now is iterating through all the rows in the datasource as below

var grid = $("#MyKendoGrid").data("kendoGrid");
var data = grid.dataSource.data();
$.each(data, function (i, row) {
        //do something
 });

But what if I want to iterate on the rows of a particular page.
I can get the current page by grid.dataSource.page(); Then what's next?

Please advise.

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 15 Oct 2012, 06:32 AM
Hello Atanu,

DataSource.view() will give you the filtered/sorted/grouped and paged data for the current DataSource instance.

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Atanu
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or