Class TreeGridSelectionSettings
Configures Tree Grid sort column.
Inheritance
Namespace: Syncfusion.Blazor.TreeGrid
Assembly: Syncfusion.Blazor.dll
Syntax
public class TreeGridSelectionSettings : OwningComponentBase
Constructors
TreeGridSelectionSettings()
Declaration
public TreeGridSelectionSettings()
Properties
AllowDragSelection
Gets or sets whether to enable selection of multiple rows and cells by dragging mouse.
Declaration
public bool AllowDragSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
To perform drag selection in Blazor TreeGrid, set Type as Multiple
.
Examples
In the below code example, enabled AllowDragSelection property
<SfTreeGrid @ref="Treegrid">
<TreeGridSelectionSettings AllowDragSelection = "true" Type="Syncfusion.Blazor.Grids.SelectionType.Multiple" >
........
</SfTreeGrid>
CellSelectionMode
The cell selection modes are flow and box. It requires the selection Mode to be either Cell or Both. Flow: Selects the range of cells between start index and end index that also includes the other cells of the selected rows. Box: Selects the range of cells within the start and end column indexes that includes in between cells of rows within the range.
Declaration
public CellSelectionMode CellSelectionMode { get; set; }
Property Value
Type |
---|
CellSelectionMode |
CheckboxMode
Defines options for checkbox selection Mode. They are Default: This is the default value of the checkboxMode. In this mode, user can select multiple rows by clicking rows one by one. ResetOnRowClick: In ResetOnRowClick mode, on clicking a row it will reset previously selected row and also multiple rows can be selected by using CTRL or SHIFT key.
Declaration
public CheckboxSelectionType CheckboxMode { get; set; }
Property Value
Type |
---|
CheckboxSelectionType |
CheckboxOnly
If CheckboxOnly set to true, then the TreeGrid selection is allowed only through checkbox.
Declaration
public bool CheckboxOnly { get; set; }
Property Value
Type |
---|
System.Boolean |
EnableToggle
If EnableToggle set to true, then the user can able to perform toggle for the selected row.
Declaration
public bool EnableToggle { get; set; }
Property Value
Type |
---|
System.Boolean |
Mode
TreeGrid supports row, cell, and both (row and cell) selection mode.
Declaration
public SelectionMode Mode { get; set; }
Property Value
Type |
---|
SelectionMode |
MultiSelectWithClick
If RowMultiSelectWithClick is set to true, then the user can able to perform multiple row selection with single clicks.
Declaration
public bool MultiSelectWithClick { get; set; }
Property Value
Type |
---|
System.Boolean |
PersistSelection
If PersistSelection set to true, then the TreeGrid selection is persisted on all operations. For persisting selection in the TreeGrid, any one of the column should be enabled as a primary key.
Declaration
public bool PersistSelection { get; set; }
Property Value
Type |
---|
System.Boolean |
Type
Defines options for selection type. They are Single: Allows selection of only a row or a cell. Multiple: Allows selection of multiple rows or cells.
Declaration
public SelectionType Type { get; set; }
Property Value
Type |
---|
SelectionType |
Methods
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |