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

TreeListView.CustomUnboundColumnData Event

Allows you to populate unbound columns with data.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public event TreeListUnboundColumnDataEventHandler CustomUnboundColumnData

#Event Data

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

Property Description
Column Gets the unbound column currently being processed. Inherited from ColumnDataEventArgsBase.
IsGetData Gets whether you should provide data for the currently processed cell. Inherited from ColumnDataEventArgsBase.
IsSetData Gets whether a cell’s value should be saved to a data source. Inherited from ColumnDataEventArgsBase.
Node Gets the node which contains the processed cell.
Value Gets 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 Data
The 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 Changes
The 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