Back to Devexpress

TreeList.UnselectCells(TreeListNode, TreeListColumn, TreeListNode, TreeListColumn) Method

windowsforms-devexpress-dot-xtratreelist-dot-treelist-dot-unselectcells-x28-treelistnode-treelistcolumn-treelistnode-treelistcolumn-x29.md

latest4.5 KB
Original Source

TreeList.UnselectCells(TreeListNode, TreeListColumn, TreeListNode, TreeListColumn) Method

Discards selection of the specified range of cells.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
public void UnselectCells(
    TreeListNode startNode,
    TreeListColumn startColumn,
    TreeListNode endNode,
    TreeListColumn endColumn
)
vb
Public Sub UnselectCells(
    startNode As TreeListNode,
    startColumn As TreeListColumn,
    endNode As TreeListNode,
    endColumn As TreeListColumn
)

Parameters

NameTypeDescription
startNodeTreeListNode

A node containing the cell that specifies the starting point of the range to unselect.

| | startColumn | TreeListColumn |

A column containing the cell that specifies the starting point of the range to unselect.

| | endNode | TreeListNode |

A node containing the cell that specifies the end point of the range to unselect.

| | endColumn | TreeListColumn |

A column containing the cell that specifies the end point of the range to unselect.

|

Remarks

The UnselectCells method discards the selection of multiple cells in the specified range. The start and end points of the range are specified using the cells located at the intersection of the nodes (rows) and columns passed as parameters. To select cells, use the TreeList.SelectCell or TreeList.SelectCells method.

The code snippet below shows how to unselect a particular range of cells in the TreeList using the UnselectCells method.

csharp
treeList1.UnselectCells(treeList1.Nodes[0].Nodes[0], treeList1.Columns[1], treeList1.Nodes[0].Nodes[1], treeList1.Columns[2]);
vb
treeList1.UnselectCells(treeList1.Nodes[0].Nodes[0], treeList1.Columns[1], treeList1.Nodes[0].Nodes[1], treeList1.Columns[2])

After the selection is changed, the TreeList.SelectionChanged event is raised.

Note

The UnselectCells method is not in effect if multiple cell selection is disabled. This mode can be enabled by setting the TreeListOptionsSelection.MultiSelect property to true and the TreeListOptionsSelection.MultiSelectMode property to CellSelect.

See Also

UnselectCell(TreeListNode, TreeListColumn)

SelectCell(TreeListNode, TreeListColumn)

SelectCells

SelectionChanged

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace