Back to Devexpress

PivotGridControl.CustomFilterDisplayText Event

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-19cbbcba.md

latest2.5 KB
Original Source

PivotGridControl.CustomFilterDisplayText Event

Enables custom text to be displayed in the Filter Panel.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public event ConvertEditValueEventHandler CustomFilterDisplayText
vb
Public Event CustomFilterDisplayText As ConvertEditValueEventHandler

Event Data

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

PropertyDescription
HandledGets or sets a value specifying whether default edit value conversion/formatting is required.
ValueGets or sets either the edit or the display value of an editor.

Remarks

In the following code snippet the CustomFilterDisplayText event is handled to display the “Filter is applied” string in the filter panel instead of the criteria string:

csharp
private void pivotGridControl1_CustomFilterDisplayText(object sender, DevExpress.XtraEditors.Controls.ConvertEditValueEventArgs e) {
    if(e.Value != null) {
        e.Value = "Filter is applied";
    } else {
        e.Value = e.Value.ToString();
    }
    e.Handled = true;
}
vb
Private Sub pivotGridControl1_CustomFilterDisplayText(ByVal sender As Object, ByVal e As DevExpress.XtraEditors.Controls.ConvertEditValueEventArgs)
    If e.Value IsNot Nothing Then
      e.Value = "Filter is applied"
    Else
      e.Value = e.Value.ToString()
    End If
    e.Handled = True
End Sub

See Also

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace