Get ID's for all grid rows in the correct order.

2 posts, 0 answers
  1. Mike
    Mike avatar
    4 posts
    Member since:
    Jan 2013

    Posted 05 Apr 2016 Link to this post

    Hi

    I am trying to return IDs for all grid rows in the order the grid is shown in...I have a hidden column which contains the ID.

    I first tried with the code below.. where gridData is the datasource.data

            for (var i = 0; i < gridData.length; i++) {
                var dataitem = gridData[i].Id;            
            }

    The above works, however the ID order is always the same even after fort or filters have been applied.

    What am I doing wrong or what property should I be using?

    Regards

    Mike

  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 07 Apr 2016 Link to this post

    Hello Mike,

     

    The data method is not affected by any expression applied to the DataSource (grouping, sorting or etc). The view method returns the data items which correspond to the current page, filter, sort and group configuration.

     

    Regards,
    Boyan Dimitrov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top