TcxEditingControl.OnFilterControlDialogShow Event
Enables you to customize the Filter Builder dialog before showing it.
Declaration
property OnFilterControlDialogShow: TNotifyEvent read; write;
Remarks
The Filter Builder dialog allows end-users to build complex filter criteria with an unlimited number of filter conditions combined by logical operators. End-users can invoke this dialog by clicking the Filter button in the editing control’s embedded navigator.
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 tree list control‘s 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 TMyForm.cxTreeList1FilterControlDialogShow(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;