Skip to main content
Tab

ASPxVerticalGrid.CustomUnboundRowData Event

Enables data to be supplied to unbound rows.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public event ASPxVerticalGridRowDataEventHandler CustomUnboundRowData

Event Data

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

Property Description
IsGetData Gets whether you should provide data for the currently processed cell. Inherited from ASPxGridColumnDataEventArgs.
IsSetData Gets whether the cell’s value should be stored in a custom data source. Inherited from ASPxGridColumnDataEventArgs.
ListSourceRowIndex Gets the current data item’s (row, card or record) index in the data source. Inherited from ASPxGridColumnDataEventArgs.
Row Gets the unbound row currently being processed.
Value Gets or sets the value of the cell currently being processed. Inherited from ASPxGridColumnDataEventArgs.

The event data class exposes the following methods:

Method Description
GetListSourceFieldValue(Int32, String) Returns the value of the specified field in the specified data item (row, card or record) in the control’s underlying data source. Inherited from ASPxGridColumnDataEventArgs.
GetListSourceFieldValue(String) Returns the value of the specified cell in the processed data item (row, card or record) in the control’s underlying data source. Inherited from ASPxGridColumnDataEventArgs.

Remarks

The CustomUnboundRowData event is fired for unbound rows only. To create an unbound row, add a new data row to the ASPxVerticalGrid.Rows collection and set its VerticalGridDataRow.UnboundType property to an appropriate value, based on the type of data the row is supposed to display. This row’s VerticalGridDataRow.FieldName property value must be unique and it must not refer to any field in the ASPxVerticalGrid’s underlying data source.

When the ASPxVerticalGrid is loaded, it raises the CustomUnboundRowData event for each cell in unbound rows, allowing you to populate cells with data. By default, the event’s ASPxGridColumnDataEventArgs.IsGetData parameter is set to true. In this instance, you need to supply data for the currently processed cell. Obtain the required value from a custom data source and assign it to the ASPxGridColumnDataEventArgs.Value parameter.

To save the modified data back to the data source, handle the ASPxVerticalGrid.RecordUpdating event.

The currently processed cell is identified by the column and row, which can be determined via the ASPxGridViewColumnDataEventArgs.Column and ASPxGridColumnDataEventArgs.ListSourceRowIndex properties, respectively.

The CustomUnboundRowData event argument provides the ASPxGridColumnDataEventArgs.GetListSourceFieldValue method, allowing you to get the value of the required cell.

See Also