jQWidgets Forums

jQuery UI Widgets Forums Grid Limit the number of rows a user selects

Tagged: ,

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Limit the number of rows a user selects #65587

    Abijeet
    Participant

    I’m using selectionmode as checkbox and would like to limit the number of records a user can select to 5. Is this possible? I can’t believe that I can’t stop the propagation of the rowselect event to stop the row from being selected. That’s a pretty bad implementation.

    
    $jqxTaggedDev.on('rowselect', function(event) {
      var selectedRows = $jqxTaggedDev.jqxGrid('getselectedrowindexes');
      if (selectedRows.length > __GLOBAL__.maxSelectedRows) {
        // Doesn't work.        
        var rowIndex = event.args.rowindex;
        $jqxTaggedDev.jqxGrid('unselectrow', rowIndex);
        $jqxTaggedDev.jqxGrid('refresh');
    
        // Doesn't work either
        event.stopPropogation();
        return false;
      }
    });
    
    Limit the number of rows a user selects #65591

    Peter Stoev
    Keymaster

    Hi Abijeet,

    Restriction of what can be or cannot be selected is not supported by our Grid.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Limit the number of rows a user selects #65593

    Abijeet
    Participant

    Hi Peter,

    I’m sorry if I came off as rude. Most of the times the grid is awesome and does so many awesome things automatically but sometimes it can be a pain to use. Thanks, though, I’ll see if I can find a “hacky” way of doing this.

    Limit the number of rows a user selects #65595

    Peter Stoev
    Keymaster

    Hi Abijeet,

    jqxGrid has many features, but does not have all features for everybody. That’s why the evaluation is free.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.