jQuery UI Widgets Forums TreeGrid Disable row selection

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Disable row selection #50233

    wimwest
    Participant

    Is it possible to disable row selection for toplevel rows in TreeGrid? I want only the child rows selectable for a user.
    Thanks.

    Disable row selection #50235

    Peter Stoev
    Keymaster

    Hi wimwest,

    It is not possible to disable the selection of specific rows in the TreeGrid.

    Best Regards,
    Peter Stoev

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

    Disable row selection #50299

    wimwest
    Participant

    Found a (dirty) solution for it.
    Toplevel rows have records so I just raise an arbitrary exception in the rowClick event, which apparently prevents the row from being selected.
    $(‘#treeGrid’).on(‘rowClick’,
    function (event)
    {
    if(event.args.row.records.length > 0)
    throw ‘preventing selection’;
    }
    );

    It would be a lot nicer to be able touse event.stopPropagation, event.preventDefault or return false, but that doesn’t work with the jqwidgets

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

You must be logged in to reply to this topic.