Skip to main content

BootstrapCardView.CustomUnboundColumnData Event

Enables you to supply data to unbound columns.

Namespace: DevExpress.Web.Bootstrap

Assembly: DevExpress.Web.Bootstrap.v24.2.dll

Declaration

public event BootstrapCardViewColumnDataEventHandler CustomUnboundColumnData

Event Data

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

Property Description
Column Gets the unbound column currently being processed.
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.
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 CustomUnboundColumnData event is fired for unbound columns only. To create an unbound column, add a new data column to the BootstrapCardView.Columns collection and set its CardViewColumn.UnboundType property to an appropriate value, based on the type of data the column is supposed to display. This column’s CardViewColumn.FieldName property value must be unique and it must not refer to any field in the CardView’s underlying data source.

When the CardView is loaded, it raises the CustomUnboundColumnData event for each cell in unbound columns, 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 ASPxCardView.CardUpdating event.

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

See Also