QuantumGrid - carregar um filtro salvo previamente em arquivos cxgrid |
Top Previous Next |
How to filter the Grid using a filter saved in a file
ArticleID: 71; Product: ExpressQuantumGrid; Version(s): 4; Technology: VCL; Updated: 4/5/2004
Description
How can I programmatically load a filter that was saved in a file via the filter builder at runtime.
Solution
The following code shows how you can do this:
[Delphi]
procedure TForm1.Button1Click(Sender: TObject); var AFilterControl: TcxFilterControl; begin AFilterControl := TcxFilterControl.Create(Self); AFilterControl.LinkComponent := cxGrid1DBTableView1; AFilterControl.LoadFromFile('filter.flt'); AFilterControl.ApplyFilter; cxGrid1DBTableView1.DataController.Filter.Active := True; AFilterControl.Free; end; |