jQWidgets Forums

jQuery UI Widgets Forums TreeGrid Right-Click Clears Selected Rows

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Right-Click Clears Selected Rows #49951

    mdols
    Participant

    I have a TreeGrid with a Context Menu that shows a modal Window to edit the selected rows (one or more). However, if you right-click to display the Context Menu without holding down the Ctrl key, the previously selected rows are un-selected. Is there a way to prevent rows from being un-selected on a right-click event? I tried handling the rowUnselect event, but wasn’t able to determine which mouse button was pressed to cause the row to be un-selected.

    Thank you,
    Mike

    Sample Code:
    treeGridControl.off(‘rowClick’).on(‘rowClick’, function (event) {
    var args = event.args;
    if (args.originalEvent.button == 2) {
    // Display Task Context Menu
    var scrollTop = $(window).scrollTop();
    var scrollLeft = $(window).scrollLeft();
    var treeGridId = getCurrentTaskTreeGridId();
    contextMenu.jqxMenu(‘open’, parseInt(event.args.originalEvent.clientX) + 5 + scrollLeft,
    parseInt(event.args.originalEvent.clientY) – 310 + scrollTop);
    $(‘body’).addClass(‘modal-background’);
    return false;
    }
    }

    Right-Click Clears Selected Rows #49953

    Peter Stoev
    Keymaster

    Hi mdols,

    Unfortunately, there is no way to prevent the clearing on right-click.

    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.