ITreeDataGridCellSelectionModel<T> Interface
Definition
Maintains the cell selection state for an Avalonia.Controls.ITreeDataGridSource.
public interface ITreeDataGridCellSelectionModel<T>
Methods
| Name | Description |
|---|---|
| IsSelected | Checks whether the specified cell is selected. |
| SetSelectedRange | Sets the current selection to the specified range of cells. |
IsSelected Method
Checks whether the specified cell is selected.
public bool IsSelected(Avalonia.Controls.CellIndex index)
Parameters
index Avalonia.Controls.CellIndex
The index of the cell.
Returns
bool
SetSelectedRange Method
Sets the current selection to the specified range of cells.
public void SetSelectedRange(Avalonia.Controls.CellIndex start, int columnCount, int rowCount)
Parameters
start Avalonia.Controls.CellIndex
The index of the cell from which the selection should start.
columnCount int
The number of columns in the selection.
rowCount int
The number of rows in the selection.
Remarks
This method clears the current selection and selects the specified range of cells. Note that if the Avalonia.Controls.ITreeDataGridSource is currently sorted then the resulting selection may not be contiguous in the data source.
Properties
| Name | Description |
|---|---|
| SelectedIndex | Gets or sets the index of the currently selected cell. |
| SelectedIndexes | Gets the indexes of the currently selected cells. |
| SingleSelect | Gets or sets a value indicating whether only a single cell can be selected at a time. |
SelectedIndex Property
Gets or sets the index of the currently selected cell.
public Avalonia.Controls.CellIndex SelectedIndex { get; set; }
SelectedIndexes Property
Gets the indexes of the currently selected cells.
public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.CellIndex> SelectedIndexes { get; set; }
SingleSelect Property
Gets or sets a value indicating whether only a single cell can be selected at a time.
public bool SingleSelect { get; set; }
Events
| Name | Description |
|---|---|
| SelectionChanged | Occurs when the cell selection changes. |
SelectionChanged Event
Occurs when the cell selection changes.
public event EventHandler<Avalonia.Controls.Selection.TreeDataGridCellSelectionChangedEventArgs<T><T>> SelectionChanged