Providing Data for Unbound Columns
- 2 minutes to read
Data for unbound columns is generally obtained from a custom data source or is calculated based upon the values of bound columns.
To allow data editing for an unbound column, its data should be retrieved from a custom data source. When an end-user modifies column data within ASPxGridView, it should then be saved back to the data source.
To provide data for unbound columns and save the changes made by end-users, handle the ASPxGridView.CustomUnboundColumnData event. This event is raised only for unbound columns.
If the ASPxGridColumnDataEventArgs.IsGetData parameter is set to true, the event handler should supply data for an unbound column. A value should be assigned to the ASPxGridColumnDataEventArgs.Value parameter according to the row currently being processed. The current data row can be identified using the ASPxGridColumnDataEventArgs.ListSourceRowIndex parameter, which specifies the row's index in the ASPxGridView's data source. It is not affected by any sorting or filtering settings.