Edit this page

Customizing composite filter dialog

When you select the Custom item from the filter menu (Available Filter menu in Excel-like filtering), an appropriate dialog for creating a custom filter is shown.

Figure 1: Custom filter

gridview-filtering-composite-filter-dialog 003

Since R1 2017 SP, a CompositeDataFilterForm is shown. This dialog uses a RadDataFilter allowing the user to compose a complex filter expression.

Figure 2: CompositeDataFilterForm

gridview-filtering-composite-filter-dialog 002

In the previous versions a CompositeFilterForm is displayed. The CreateCompositeFilterDialog event is fired before the custom filter dialog is created. It allows you to create the default dialog and customize it or initialize your own implementation of the composite filter dialog.

Specify default filter dialog

Font f = new Font("Arial", 12, FontStyle.Italic);
private void radGridView1_CreateCompositeFilterDialog(object sender, GridViewCreateCompositeFilterDialogEventArgs e)
{
    CompositeFilterForm filterDialog = new CompositeFilterForm();
    filterDialog.Font = f;
    e.Dialog = filterDialog;
}

Private f As New Font("Arial", 12, FontStyle.Italic)
Private Sub radGridView1_CreateCompositeFilterDialog(sender As Object, e As GridViewCreateCompositeFilterDialogEventArgs)
    Dim filterDialog As New CompositeFilterForm()
    filterDialog.Font = f
    e.Dialog = filterDialog
End Sub

Figure 3: CompositeFilterForm

gridview-filtering-composite-filter-dialog 001

See Also