windowsforms-devexpress-dot-xtraverticalgrid-dot-vgridcontrol-12a0906a.md
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
[DXCategory("Appearance")]
public event CustomRecordDisplayTextEventHandler CustomRecordDisplayText
<DXCategory("Appearance")>
Public Event CustomRecordDisplayText As CustomRecordDisplayTextEventHandler
The CustomRecordDisplayText event's data class is CustomRecordDisplayTextEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| DisplayText | Gets or sets the text displayed in the processed cell. |
| Properties | Gets the processed row’s properties. |
| Value | Gets the processed cell’s value. |
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.
The code below changes ‘UK’ in the Country row to ‘United Kingdom’.
private void vGridControl1_CustomRecordDisplayText(object sender, DevExpress.XtraVerticalGrid.Events.CustomRecordDisplayTextEventArgs e) {
if (e.Properties.FieldName == "Country") {
if (e.DisplayText == "UK") e.DisplayText = "United Kingdom";
}
}
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