Interface GridSelectionOptions

GridSelectionOptions allow you to control the selection behavior of the grid.

Hierarchy

  • GridSelectionOptions

Properties

cellSelectableFunction?: ((node: CellSelelection) => boolean)

Type declaration

    • (node: CellSelelection): boolean
    • If you want to disable selection on a cell, you can use this function to control which cells are selectable. This function is called for each cell, and the cell is selectable if the function returns true. The Cell Selection is an object that has the following properties: rowIdentifier: The unique identifier of the row that is selected. columnIdentifier: The column id of the column that is selected.

      Parameters

      Returns boolean

enableSelectionBubble?: boolean

The flag to enable selection bubble. When this is enabled, if all child rows are selected, the parent row is also selected. This is recursive, so if all child rows are selected, the parent row is selected, and the parent row has a parent row, and all other child rows of the parent row are selected, the parent row is also selected. Default is false.

enableSelectionCascade?: boolean

The flag to enable selection cascade. When this is enabled, if a parent row is selected, all child rows are also selected. This is recursive, so if a parent row is selected, all child rows are selected, and one of the child rows has a child row, that child row is also selected. Default is false.

enableSelectionHighlight?: boolean

The flag to enable row selection highlight. When the user selects a row, the row is highlighted. This is the default behavior. If you want to disable this, set this flag to false.

initialCellSelection?: CellSelelection[]

Similar to initialRowSelection, this is an array of cell selections that are initially selected. The default is an empty array. The Cell Selection is an object that has the following properties: rowIdentifier: The unique identifier of the row that is selected. columnIdentifier: The column id of the column that is selected.

initialRowSelection?: unknown[]

The row unique idenfifiers that are initially selected. This is an array of strings. The strings are the unique identifiers of the rows that are initially selected. These need to exist in the data that is passed to the grid on initial load. The default is an empty array.

rowSelectableFunction?: ((rowIdentifier: string) => boolean)

Type declaration

    • (rowIdentifier: string): boolean
    • If you want to disable selection on a row, you can use this function to control which rows are selectable. This function is called for each row, and the row is selectable if the function returns true.

      Parameters

      • rowIdentifier: string

      Returns boolean

Generated using TypeDoc