TreeList.FindNodeByKeyID(Object) Method
Returns the node by its key field value.
Namespace: DevExpress.XtraTreeList
Assembly: DevExpress.XtraTreeList.v18.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
keyID | Object | An object representing the key field value of the requested node. |
Returns
Type | Description |
---|---|
TreeListNode | The node that has the specified key field value. null (Nothing in Visual Basic) if no node is found that matches the criteria. |
Remarks
The name of a field containing unique values must be assigned to the TreeList.KeyFieldName property. Values of this field are used to reference data source records when constructing the nodes tree. Each record must reference its parent by a key field value and thus, this field must contain unique values to avoid ambiguities.
Use the FindNodeByKeyID method to obtain the node by its key field value. Note that nodes can also be obtained by their identifiers. Use the TreeList.FindNodeByID method for this purpose.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FindNodeByKeyID(Object) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.