ASPxGridView.CustomPreviewDisplayText Event
Enables you to provide custom display text for a preview row.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Event Data
The CustomPreviewDisplayText event's data class is ASPxGridViewPreviewDisplayTextEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
DisplayText | Enables you to set a custom text for the preview row currently being processed. |
EncodeHtml | Gets or sets a value that specifies whether the preview row display text keeps any of its values that are HTML as HTML, or instead, strips out the HTML markers. |
Value | Gets the value of the preview row currently being processed. |
VisibleIndex | Gets the visible index of the preview row currently being processed. |
The event data class exposes the following methods:
Method | Description |
---|---|
GetRowValue(Int32, String) | Returns the value of the specified data source field in the specified row. |
GetRowValue(String) | Returns the value of the specified data source field in the current row. |
Remarks
The CustomPreviewDisplayText event can be used to provide custom display text for a preview row. The text provided by this event will be used when the ASPxGridView is printed or exported.
Initially, the ASPxGridViewPreviewDisplayTextEventArgs.DisplayText parameter returns null. To provide custom display text, assign the required string to this parameter. To get the current cell value, use the ASPxGridViewPreviewDisplayTextEventArgs.Value parameter.