I have a ListGrid with selectionType: “single”.
I’d like to prevent the user from un-selecting the (single) selected row (which is feasible if you click on the row while pressing Ctrl key).
Is there an easy way to obtain this behaviour?
You could return false from a mouseDown override on listGrid.body if the ctrl key was down, otherwise calling Super.
thanks, it works!
isc.defineClass("ListePerScelte", "ListGrid").addProperties({
....
bodyProperties:{
mouseDown: function () {
if (EventHandler.ctrlKeyDown()) {
isc.logWarn("ctrlKey is Down, returning false");
return false;
} else {
isc.logWarn("calling Super");
return this.Super("mouseDown", arguments);
}
}
}
});