Back to Devexpress

TreeListView.CustomUnboundColumnData Event

wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-77a1f59e.md

latest4.1 KB
Original Source

TreeListView.CustomUnboundColumnData Event

Allows you to populate unbound columns with data.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public event TreeListUnboundColumnDataEventHandler CustomUnboundColumnData
vb
Public Event CustomUnboundColumnData As TreeListUnboundColumnDataEventHandler

Event Data

The CustomUnboundColumnData event's data class is TreeListUnboundColumnDataEventArgs. The following properties provide information specific to this event:

PropertyDescription
ColumnGets the unbound column currently being processed. Inherited from ColumnDataEventArgsBase.
IsGetDataGets whether you should provide data for the currently processed cell. Inherited from ColumnDataEventArgsBase.
IsSetDataGets whether a cell’s value should be saved to a data source. Inherited from ColumnDataEventArgsBase.
NodeGets the node which contains the processed cell.
ValueGets or sets the processed cell’s value. Inherited from ColumnDataEventArgsBase.

Remarks

Unbound Columns are not bound to any field in the data source. You can calculate unbound column values based on values of bound columns or populate unbound columns with data from a custom data source.

Handle the CustomUnboundColumnData event to populate unbound columns with data and save changes to a custom data source.

Display Unbound DataThe TreeListUnboundColumnDataEventArgs.IsGetData property returns true when the GridControl populates unbound columns with data. The TreeListUnboundColumnDataEventArgs.Node property returns the processed node. Specify the TreeListUnboundColumnDataEventArgs.Value property to display data in the unbound column.Save ChangesThe TreeListUnboundColumnDataEventArgs.IsSetData property returns true when a user changes a cell value. The TreeListUnboundColumnDataEventArgs.Value property returns the modified cell value that you can save to a custom data source.

If you want to maintain a clean MVVM pattern and populate unbound columns with data in a View Model, create a command and bind it to the CustomUnboundColumnDataCommand property.

See Also

Unbound Columns

GridControl.CustomUnboundColumnData

TreeListView Class

TreeListView Members

DevExpress.Xpf.Grid Namespace