TreeListColumn.ColumnHandle Property
Gets the position of the associated field within the data source.
Namespace: DevExpress.XtraTreeList.Columns
Assembly: DevExpress.XtraTreeList.v24.1.dll
NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList
Declaration
Property Value
Type | Description |
---|---|
Int32 | An integer value representing the zero-based index of the corresponding field within the data source. |
Remarks
When the Tree List control is in the bound mode, it can display field values from the associated data source by means of columns. Columns can be bound to data source fields via the TreeListColumn.FieldName property. If a column is bound to a field, the ColumnHandle property returns the index of the bound field within the associated data source. Otherwise, it returns -1.
When working in unbound mode, the TreeList.DataSource property is set to null (Nothing in Visual Basic). Hence, columns are not bound to any field. The ColumnHandle property of any column returns -1 in this case.
You can use the TreeList.GetColumnByColumnHandle method to obtain the column object specified its handle.