How to access the detail grid programmatically

4 posts, 0 answers
  1. Yajing
    Yajing avatar
    9 posts
    Member since:
    Nov 2016

    Posted 28 Jun 2017 Link to this post

    Hi there,

    I know we can always access a grid like $("#grid").data("kendoGrid"), but this doesn't work for my situation.

    Let's say I have a grid with 2 pages, 10 rows each. And each master row has a details row(.k-detail-row) below. So what I want to do is to export the grid's data with all the sorters applied. For the main columns it is pretty simple, I can get the data (a json with 20 length) and the sorter grid.dataSource.sort() and use kendo.data.Query to do the sorting. However this only works for the main grid. The inner grid's data is still unsorted. Could you help? I don't see anything in the API to access the details row programmatically.

    Best regards,

    Yajing

  2. Stefan
    Admin
    Stefan avatar
    2915 posts

    Posted 30 Jun 2017 Link to this post

    Hello Yajing,

    The detailed Grid can be accessed using jQuery selectors.

    I made a Dojo example demonstrating how to programmatically access a detail Grid and to apply sorting to its dataSource:

    http://dojo.telerik.com/iSAKi

    I hope this is helpful.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Yajing
    Yajing avatar
    9 posts
    Member since:
    Nov 2016

    Posted 30 Jun 2017 in reply to Stefan Link to this post

    Hello Stefan,

    So nice to hear from you. I know the details Grid can be accessed using jQuery. But how can you access the details grid on the first page when you are on the second page? Let's say you sort the first details grid on the first page, then go to the second page and sort the second details grid. I want to get the data for the whole grid along with the sorted inner grids' data. Can you do this?

    Best regards

    Yajing

  4. Stefan
    Admin
    Stefan avatar
    2915 posts

    Posted 04 Jul 2017 Link to this post

    Hello Yajing,

    Currently, this is not supported by the Grid as the elements from the first page including the detailed Grid are destroyed and are not accessible when the page is changed.

    Apologies for the inconvenience this may cause you.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 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