Cell selection action in gantt control

18 Nov 20181 minute to read

You can select a cell in the Gantt control by setting the selectionSettings.mode property to cell. You can get the selected cell information using the getSelectedRowCellIndexes method. This method returns the result as an object collection, which has cellIndexes and rowIndex information of the selected cells.

Find the code example below to enable the cell selection in Gantt.

Selecting multiple cells

You can select multiple cells by setting the SelectionSettings.Type property to Multiple. You can select more than one cell by holding down the CTRL key while selecting multiple cells. The following code example explains how to enable multiple selection in Gantt.

Selecting a cell dynamically

You can select a cell dynamically using the selectCell method. Refer to the following code example for details.

Customize cell selection action

While selecting a cell in Gantt, the cellSelecting and cellSelected event will be triggered. The cellSelecting event will be triggered on initialization of cell selection action, and you can get the current selecting cell information to prevent the selection of a particular cell in a particular row. The cellSelected event will be triggered on completion of cell selection action, and you can get the current selected cell’s information. The following code example demonstrates how to prevent the selection of the cell using the cellSelecting event.

Limitations for cell selection

  • Cell-based selection is not supported when virtualization is enabled.