Getting Row Type Client Side

2 posts, 0 answers
  1. Tracy
    Tracy avatar
    123 posts
    Member since:
    Nov 2010

    Posted 23 Jan 2018 Link to this post

    Hi,

    How can I get the grid row type when looping through all rows in grid client side.

             

               var masterTable = $find("<%=rgvMainGrid.ClientID%>").get_masterTableView();
               var rowCount = masterTable.get_element().rows.length;
               for (var i = 0; i < rowCount; i += 1) {
    //Get Type Of Row Here (ie. GroupHeader, Data Row, GroupFooter)
    }

     

    Also, is there a complete list of the Client API objects.  I found a Client Side Programming Overview document but it only has few of the objects listed. 

    For example, the documentation lists the .get_masterTableView() but I don't see anything on 

    .get_masterTableView().getCellByColumnUniqueName or .get_masterTableView().get_element().rows.length

     

    Thank You

    Tracy

     

     

     

     

  2. Eyup
    Admin
    Eyup avatar
    3862 posts

    Posted 26 Jan 2018 Link to this post

    Hi Tracy,

    There are different Telerik objects related to the grid structure. The main methods and properties you can find enlisted in these articles:
    https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/radgrid-object/radgrid-class-members
    https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/gridtableview-object/gridtableview-class-members
    https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/griddataitem-object/griddataitem-class-members
    https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/gridcolumn-object/gridcolumn-class-members

    There is no common collection to hold all types of grid items, but there is a direct method to get the GridDataItem objects - grid.get_masterTableView().get_dataItems(). I hope this will prove helpful to your specific scenario.

    If you have different requirements or further instructions, please elaborate on what exactly you want to achieve and send us sample screenshots or video demonstrating the exact desired behavior.

    Regards,
    Eyup
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top