jQWidgets Forums

jQuery UI Widgets Forums Grid rowselect event with multiplerowsextend

This topic contains 2 replies, has 2 voices, and was last updated by  Pietervk 6 years, 11 months ago.

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

  • Pietervk
    Participant

    Hi,
    I want to change my grid to use selectionmode ‘multiplerowsextend’.

    Currently, I catch the rowselect event:

       .on('rowselect', function (event) {
                // event arguments.
                var args = event.args;
                // row's bound index.
                selectedRow = args.rowindex;
           

    I would like to know in this event, if there is only a single row selected, or multiple.

    What is the best way to do that?
    I tried

      var isMultiple = $("#jqxgrid").jqxGrid('getselectedrowindexes').length >1;
               

    However, this trails the event, e.g. this returns true if I first select multiple rows, and then just one.

    Thanks


    Hristo
    Participant

    Hello Pietervk,

    The rowselect event provides data about the currently selected row.
    If you want to know are there more selected rows you should use the mentioned approach with getselectedrowindexes method.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    Pietervk
    Participant

    Thanks, I got this working now.

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

You must be logged in to reply to this topic.