Raised before a cell is selected.
Namespace: MindFusion.DataViews
File: Grid.js
JavaScript Copy Code |
---|
EventDispatcher cellSelecting |
The event handler method receives the following arguments:
sender
A Grid instance, which is the source of the event. This object will be passed to the handler function as the first argument.
args
A CellEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.
The following code handles the cellSelecting event of a Grid instance and does not allow a cell to be selected if a check box with an id "cancelSelecting" is checked:
JavaScript Copy Code |
---|
grid.cellSelecting.addEventListener((sender, args) => { if (document.getElementById("cancelSelecting").checked) { args.cancel = true; return; } var value = sender.effectiveModel.value(args.row, args.column); }); |