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;
}
}