VGridControl.CustomColumnDisplayText Event
Fires before the Filter Dropdown for a particular row is displayed, allowing you to provide custom display text for filter values.
Namespace: DevExpress.XtraVerticalGrid
Assembly: DevExpress.XtraVerticalGrid.v18.2.dll
Declaration
[DXCategory("Appearance")]
public event CustomRecordDisplayTextEventHandler CustomColumnDisplayText
Event Data
The CustomColumnDisplayText event's data class is DevExpress.XtraVerticalGrid.Events.CustomRecordDisplayTextEventArgs.
Remarks
The CustomColumnDisplayText event fires for each record, allowing you to provide custom display text for values in the Filter Dropdown. To determine the processed row, use the Properties event argument (see BaseRow.Properties). The data value can be obtained using the Value argument. The DisplayText property gets the default text displayed for the processed filter value, and allows you to set a custom text.
In the following example, the ‘UK’ value of the ‘Country’ row, as represented in the control, is changed to ‘United Kingdom’ in the Filter Dropdown.
private void vGridControl1_CustomColumnDisplayText(object sender, DevExpress.XtraVerticalGrid.Events.CustomRecordDisplayTextEventArgs e) {
if (e.Properties.FieldName == "Country") {
if (e.DisplayText == "UK") e.DisplayText = "United Kingdom";
}
}