New to Telerik UI for WinForms? Download free 30-day trial

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

WinForms RadGridView Custom filter

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

WinForms RadGridView CompositeDataFilterForm

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

WinForms RadGridView CompositeFilterForm

See Also

In this article