jQuery UI Widgets Forums Grid Nested Grid

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Nested Grid Posts
  • Nested Grid #49666

    assaf.frank123
    Participant

    Hi,

    While having nested grids,
    is there any way to make sure only one row of the parent grid is open at a time –
    I mean, every time a row details is opened to show the nested grid all other details are closed?

    Thanks.

    Nested Grid #49670

    Dimitar
    Participant

    Hello

    To achieve this, add the following code to your page:

    $("#jqxgrid").on("cellclick", function (event) {
        var columnindex = event.args.columnindex;
        if (columnindex == 0) {
            var rowindex = event.args.rowindex;
            var rows = $('#jqxgrid').jqxGrid('getrows');
            for (var i = 0; i < rows.length; i++) {
                if (i != rowindex) {
                    $('#jqxgrid').jqxGrid('hiderowdetails', i);
                };
            };
        };
    });

    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.