BootstrapCardView.CustomColumnDisplayText Event

Enables custom display text to be provided for any cell.

Namespace: DevExpress.Web.Bootstrap

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


public event BootstrapCardViewColumnDisplayTextEventHandler CustomColumnDisplayText
Public Event CustomColumnDisplayText As BootstrapCardViewColumnDisplayTextEventHandler

Event Data

The CustomColumnDisplayText event handler receives an argument of the BootstrapCardViewColumnDisplayTextEventArgs type. The following properties provide information specific to this event.

Property Description
Column Gets the data column that refers to the card currently being processed.
DisplayText Enables you to set a custom text for the cell currently being processed.
EncodeHtml Gets or sets a value that specifies whether the cell display text keeps any of its values that are HTML as HTML, or instead, strips out the HTML markers.
Value Gets the edit value of the cell currently being processed.
VisibleIndex Gets the visible index of the data item (row, card or record) where the processed cell resides.


The CustomColumnDisplayText event can be used to provide custom display text for any cell. This event is fired for both bound and unbound columns. The text provided via this event will be used when the CardView is printed or exported.

Initially, the ASPxGridColumnDisplayTextEventArgs.DisplayText parameter returns null. To provide custom display text, assign the required string to this parameter. To get the current cell value, use the ASPxGridColumnDisplayTextEventArgs.Value parameter.

The example below demonstrates how to display the "empty" string within the Discount column's cells if they contain zero values.

protected void CardView_CustomColumnDisplayText(object sender, BootstrapCardViewColumnDisplayTextEventArgs e)
    if (e.Column.FieldName != "Discount") return;
    if (Convert.ToInt32(e.Value) == 0)
        e.DisplayText = "empty";
See Also