Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeListMultiSelection.Contains(TreeListNode) Method

Specifies whether a specific node is in the collection of selected nodes.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

public bool Contains(
    TreeListNode node
)

#Parameters

Name Type Description
node TreeListNode

The TreeListNode object to check.

#Returns

Type Description
Boolean

true if a node is in the collection of selected nodes; otherwise, false

#Remarks

The Contains method defines whether a specific node is selected.

#Example

The code below determines whether the first node in the Tree List is selected.

bool firstIsSelected = treeList1.Selection.Contains(treeList1.Nodes[0]);
See Also