Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1045
what's the best practice to get the inner grid of a specific row
posted

Hi experts, please take a look at following link, http://www.igniteui.com/hierarchical-grid/overview . What's the best way to get the Beverages row, and then get "Fruit punch" row, and then get the quality of this row, which is 4. I know I can definitely do this by iterating the table dom tree, but is there a specific iggrid api for doing this? 

If I try from outer grid to inner grid, I can get all rows of hierarchical grid by using http://help.infragistics.com/jQuery/2015.1/ui.iggrid_hg#methods:rows, but how can I get the inner grid widget of row[1]?

If I try from inner grid to outer grid, I can get all children widgets by using http://help.infragistics.com/jQuery/2015.1/ui.ighierarchicalgrid#methods:allChildrenWidgets, but how can I know which row this inner widget belongs to?

Parents
No Data
Reply
  • 15320
    Offline posted

    Hello Ming,

    You can access the "Beverages" row data and its child row data using the following code:

    $("#hierarchicalGrid").data("igHierarchicalGrid").options.dataSource[1].Products[1].Name - this will return "Fruit punch"

    $("#hierarchicalGrid").data("igHierarchicalGrid").options.dataSource[1].Products[1].Quantity - this will return "4"

    If you have any further questions, feel free to contact me.

    Regards,

    Tsanna

Children