jQWidgets Forums

jQuery UI Widgets Forums Grid Rowindex after sorting

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Rowindex after sorting #23248

    hf
    Participant

    When I select a row after sorting the grid I get the ‘old’ rowindex.

    $(“#jqxgrid”).on(‘rowselect’, function (event) {
    var selectedrowindex = event.args.rowindex;
    var selectedrowindexes = $(“#jqxgrid”).jqxGrid(‘selectedrowindexes’);
    });

    $(“#jqxgrid”).jqxGrid({
    theme: theme,
    localization: localizationobj,
    width: function () {
    width = ($(‘#mainSplitter’).width() – 2) / mainSplitter * 100 + ‘%’;
    },
    height: function () {
    height = (($(‘#panel1’).height() – $(‘#jqxmenu’).height()) – 4) / $(‘#panel1’).height() * 100 + ‘%’;
    return height
    },
    source: dataAdapter,
    rowsheight: 35,
    sortable: true,
    altrows: true,
    selectionmode: ‘multiplerows’,
    ready: function () {
    $(“#jqxgrid”).jqxGrid(‘hidecolumn’, ‘A);
    },
    columns: [
    { text: ‘A’, dataField: ‘A’, editable: false, pinned: true, width: 80 },
    { text: ‘B’, dataField: ‘B’, editable: false, width: 80 },
    { text: ‘C’, dataField: ‘C’, filtercondition:’contains’, editable: false, width: 80 },
    { text: ‘D’, dataField: ‘D’, editable: false, width: 80 }
    ]
    });

    How do I get the new indexes?

    Rowindex after sorting #23249

    Peter Stoev
    Keymaster

    Hi,

    The selection in our Grid is based on the Row Bound Indexes(bound index is the index in the data source) which remain unchanged after sorting.

    Best Regards,
    Peter Stoev

    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.