Back to Devexpress

VGridControl.CustomRecordDisplayText Event

windowsforms-devexpress-dot-xtraverticalgrid-dot-vgridcontrol-12a0906a.md

latest3.1 KB
Original Source

VGridControl.CustomRecordDisplayText Event

Allows you to customize the text displayed in a cell and the corresponding filter.

Namespace : DevExpress.XtraVerticalGrid

Assembly : DevExpress.XtraVerticalGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid

Declaration

csharp
[DXCategory("Appearance")]
public event CustomRecordDisplayTextEventHandler CustomRecordDisplayText
vb
<DXCategory("Appearance")>
Public Event CustomRecordDisplayText As CustomRecordDisplayTextEventHandler

Event Data

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

PropertyDescription
DisplayTextGets or sets the text displayed in the processed cell.
PropertiesGets the processed row’s properties.
ValueGets the processed cell’s value.

Remarks

The Properties event argument allows you to identify the processed row. The Value event argument returns the processed cell’s value. Use the DisplayText property to customize the text displayed in the cell and the corresponding filter.

Example

The code below changes ‘UK’ in the Country row to ‘United Kingdom’.

csharp
private void vGridControl1_CustomRecordDisplayText(object sender, DevExpress.XtraVerticalGrid.Events.CustomRecordDisplayTextEventArgs e) {
    if (e.Properties.FieldName == "Country") {
        if (e.DisplayText == "UK") e.DisplayText = "United Kingdom"; 
    }           
}
vb
Private Sub vGridControl1_CustomRecordDisplayText(sender As Object, e As DevExpress.XtraVerticalGrid.Events.CustomRecordDisplayTextEventArgs)
    If e.Properties.FieldName = "Country" Then
        If e.DisplayText = "UK" Then
            e.DisplayText = "United Kingdom"
        End If
    End If
End Sub

See Also

Properties

VGridControl Class

VGridControl Members

DevExpress.XtraVerticalGrid Namespace