TreeListNode.SetValue(Object, Object) Method

Sets the value for a specific column.

Namespace: DevExpress.XtraTreeList.Nodes

Assembly: DevExpress.XtraTreeList.v20.1.dll

Declaration

public virtual void SetValue(
    object columnID,
    object val
)
Public Overridable Sub SetValue(
    columnID As Object,
    val As Object
)

Parameters

Name Type Description
columnID Object

An object that identifies a column (a TreeListColumn object, field name, column's absolute index or corresponding DataColumn object).

val Object

The value to set for a specific column in the current node.

Remarks

The following objects and values can be passed as column identifiers:

Examples

The next example demonstrates how to access a focused node value in the column which is identified by the TreeListColumn.AbsoluteIndex property set to 0.

Two ways are provided to perform this operation: via the TreeListNode.Item property and TreeListNode.SetValue method.

//first method
treeList1.FocusedNode.SetValue(0, "new value");
//second method
treeList1.FocusedNode[0] = "new value";
See Also