Back to Devexpress

ASPxVerticalGrid.CustomRowDisplayText Event

aspnet-devexpress-dot-web-dot-aspxverticalgrid-f9c33fc3.md

latest5.4 KB
Original Source

ASPxVerticalGrid.CustomRowDisplayText Event

Enables custom display text to be provided for any cell.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event ASPxVerticalGridRowDisplayTextEventHandler CustomRowDisplayText
vb
Public Event CustomRowDisplayText As ASPxVerticalGridRowDisplayTextEventHandler

Event Data

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

PropertyDescription
DisplayTextEnables you to set a custom text for the cell currently being processed. Inherited from ASPxGridColumnDisplayTextEventArgs.
EncodeHtmlGets 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. Inherited from ASPxGridColumnDisplayTextEventArgs.
KindGets the type of operations with grid data. Inherited from ASPxGridColumnDisplayTextEventArgs.
RowGets the row that contains the cell currently being processed.
ValueGets the edit value of the cell currently being processed. Inherited from ASPxGridColumnDisplayTextEventArgs.
VisibleIndexGets the visible index of the data item (row, card or record) where the processed cell resides. Inherited from ASPxGridColumnDisplayTextEventArgs.

The event data class exposes the following methods:

MethodDescription
GetFieldValue(Int32, String)Returns the value of the specified data source field in the specified data item (row, card or record). Inherited from ASPxGridColumnDisplayTextEventArgs.
GetFieldValue(String)Returns the value of the specified data source field in the current data item (row, card or record). Inherited from ASPxGridColumnDisplayTextEventArgs.

Remarks

The CustomRowDisplayText event can be used to provide custom display text for any cell. This event is fired for both bound and unbound rows. The text provided via this event will be used when the ASPxVerticalGrid 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 CustomRowDisplayText event fires in two cases.

Note

The CustomRowDisplayText event should not be handled for template rows.

See Also

Data Formatting

Vertical Grid

ASPxVerticalGrid Class

ASPxVerticalGrid Members

DevExpress.Web Namespace