jQuery UI Widgets Forums Grid sorting main grid that has nested grid

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • mjf200
    Participant

    I have a grid that has server sorting. The grid also has a sub grid. When I first expand a row in the main grid, my initrowdetails function is called. That adds an element to the nestedGrids array just like in the nested grid examples. Say I expand the first row in the main grid, index 0 is sent to initrowdetails. Both grids are virtual:true and pull data from the server.

    sort function for main grid:

    sort: function () {
        $("#jqxgrid").jqxGrid('updatebounddata', 'sort');
    }

    The issue I have is when I sort the main grid, the records are reordered and if I expand the new first record in the main grid, initrowdetails is NOT called again. The row details from the OLD first record are then redisplayed.

    beginning of the initrowdetails function:

    var initrowdetails = function (index, parentElement, gridElement, record) {
    var id = record.uid.toString();
    var grid = $($(parentElement).children()[0]);
    nestedGrids[index] = grid;

    Is there a way to “reset” the rowdetails after sorting? I do NOT have this issue when filtering. If I filter and expand a row at an index previously expanded the initrowdetails is called again and I get the correct rowdetails.

    As I side note, when I sort with the rowdetails expanded, they do not disappear. But I can get around that by keeping track of expanded rows and calling the hiderowdetails if needed. But again, if I filter with a row expanded, it gets hidden when the data is refreshed.

    Thanks,
    Mike


    Dimitar
    Participant

    Hello Mike,

    Please refer to the following forum post for more information: http://www.jqwidgets.com/community/topic/rowdetails-data-doesnt-refresh/#post-69125.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.