jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Row Details Nested Grid get Details

This topic contains 4 replies, has 3 voices, and was last updated by  Klaus H 11 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Grid Row Details Nested Grid get Details #46198

    heimax
    Participant

    Hi,

    Is it able to get the nested grid’s rows content?
    as the API getrowdetails return the html but not the jqxgrid object.

    Thanks in advance.

    Best Regards,

    Max

    Grid Row Details Nested Grid get Details #46199

    Peter Stoev
    Keymaster

    Hi Max,

    In the “initrowdetails” callback, you can save the Grid’s object in some Array based on the row parameter.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid Row Details Nested Grid get Details #46200

    heimax
    Participant

    Hi Peter,

    Thanks for your reply,

    Can you kindly provide some sample codes?

    Best Regards,

    Max

    Grid Row Details Nested Grid get Details #46202

    Peter Stoev
    Keymaster

    Hi Max,

    That was a suggestion how you can implement it on your side. Unfortunately, we do not have such sample available. In general you have to create an array – var myArray = new Array(); Then in the “initrowdetails”, fill the array with Grid objects based on the function’s row parameter i.e sth. like myArray[row] = gridObject;

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid Row Details Nested Grid get Details #46211

    Klaus H
    Participant

    I have a grid with editable nested grids, which I need to add rows to.

    My best solution was to assign the nested grid a unique id (according to the id you connect them to) in the initrowdetail function:
    var id = record.uid.toString();
    var grid = $($(parentElement).children()[0]);
    $(grid).attr(‘id’, ‘somename_’ + id);

    Then if you work with the id anywhere else on this page, you can access it via:
    var data = $(‘#somename_’ + id).jqxGrid(‘getrows’);

    And if you somehow want to access all nested grids, assign it a css class for later selection.
    $(grid).addClass(‘nestedgrid’);

    $(‘.nestedgrid’).jqxGrid(‘…’)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.