Search
Grid.cellSelecting Event
See Also
 






Raised before a cell is selected.

Namespace: MindFusion.DataViews
File: Grid.js

 Syntax

JavaScript  Copy Code

EventDispatcher cellSelecting

 Event Data

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.

 Example

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

 See Also