Class TreeGridSelectionSettings
Inheritance
Namespace: Syncfusion.EJ2.TreeGrid
Assembly: Syncfusion.EJ2.dll
Syntax
public class TreeGridSelectionSettings : EJTagHelper
Constructors
TreeGridSelectionSettings()
Declaration
public TreeGridSelectionSettings()
Properties
CellSelectionMode
Determines the mode for cell selection, available options are flow and box.
Requires the selection mode
to be either cell or both.
Flow
: Selects the range between start and end indexes, including other cells of selected rows.
Box
: Selects cells within the start and end column indexes within the selected rows.
Declaration
public CellSelectionMode CellSelectionMode { get; set; }
Property Value
Type | Description |
---|---|
CellSelectionMode | The default value is Syncfusion.EJ2.Grids.CellSelectionMode.Flow |
CheckboxMode
Specifies the mode for checkbox selection:
Default
: Allows selection of multiple rows by clicking on each row individually.
ResetOnRowClick
: Resets prior selection when a new row is clicked. Multiple rows can be selected using CTRL or SHIFT keys.
Declaration
public CheckboxSelectionType CheckboxMode { get; set; }
Property Value
Type | Description |
---|---|
CheckboxSelectionType | The default value is Syncfusion.EJ2.Grids.CheckboxSelectionType.Default |
CheckboxOnly
If set to true, TreeGrid selection is allowed only through checkboxes. Ensure the column type is set to checkbox
to enable this mode.
Declaration
public bool CheckboxOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
ContentTemplate
To get or set value for ContentTemplate.
Declaration
public MvcTemplate<object> ContentTemplate { get; set; }
Property Value
Type |
---|
Syncfusion.EJ2.MvcTemplate<System.Object> |
EnableToggle
Enables toggling of the selected row. When true, users can toggle the selection of a row.
Declaration
public bool EnableToggle { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
Mode
Specifies the selection mode for the TreeGrid, which supports row, cell, and both (row and cell) selection modes.
Row
: Selects the entire row.
Cell
: Selects a single cell.
Both
: Selects the entire row and its cells.
Declaration
public SelectionMode Mode { get; set; }
Property Value
Type | Description |
---|---|
SelectionMode | The default value is Syncfusion.EJ2.Grids.SelectionMode.Row |
PersistSelection
When set to true, the TreeGrid selection persists even during various grid operations such as sorting or paging. Requires at least one column to be configured as the primary key for persistence.
Declaration
public bool PersistSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
Type
Defines the selection type, specifying whether single or multiple selections are allowed.
Single
: Allows selection of only a single row or cell.
Multiple
: Allows selection of multiple rows or cells.
Declaration
public SelectionType Type { get; set; }
Property Value
Type | Description |
---|---|
SelectionType | The default value is Syncfusion.EJ2.Grids.SelectionType.Single |