Skip to main content

TcxCustomGridTableView.OnFilterControlDialogShow Event

Enables you to customize the Filter Builder dialog before showing it.

Declaration

property OnFilterControlDialogShow: TNotifyEvent read; write;

Remarks

The Sender parameter specifies the dialog’s form. Cast an object passed as this parameter to TfmFilterControlDialog defined in the cxFilterControlDialog unit to access the settings of the form and its controls. For example, you can use the Sender.FilterControl property to access the filter control that provides filter criteria customization.

The code example below shows how to handle the OnFilterControlDialogShow event to hide the dialog’s Open and Save As… buttons, change the dialog’s caption, and hide the filter control’s tree lines.

uses
  ..., cxFilterControlDialog;
// ...
procedure <Form>.<View>FilterControlDialogShow(Sender: TObject);
var
  frm: TfmFilterControlDialog;
begin
  frm := Sender as TfmFilterControlDialog;
  frm.Caption := 'Filter Builder';
  frm.btOpen.Visible := False;
  frm.btSave.Visible := False;
  frm.FilterControl.ShowLevelLines := False;
end;
See Also