Back to Devexpress

TreeListMultiSelection.AddRemove(TreeListNode) Method

windowsforms-devexpress-dot-xtratreelist-dot-treelistmultiselection-dot-addremove-x28-devexpress-dot-xtratreelist-dot-nodes-dot-treelistnode-x29.md

latest2.5 KB
Original Source

TreeListMultiSelection.AddRemove(TreeListNode) Method

Toggles the specified node between the selected and deselected states.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public void AddRemove(
    TreeListNode node
)
vb
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
Public Sub AddRemove(
    node As TreeListNode
)

Parameters

NameTypeDescription
nodeTreeListNode

A TreeListNode object representing the node to be selected or deselected.

|

Remarks

If the collection doesn’t contain the specified node, the node is added to the collection. This results in selecting the node. Otherwise, the node is removed from the collection. The node is deselected as a result.

End-users can toggle a node between the selected and deselected states by clicking this node or its corresponding indicator cell while holding the CTRL key pressed.

The AddRemove method is in effect only when the TreeListOptionsSelection.MultiSelect option is enabled.

The Node Selection topic provides detailed information about selections.

See Also

Add

Remove(TreeListNode)

TreeListMultiSelection Class

TreeListMultiSelection Members

DevExpress.XtraTreeList Namespace