You are on page 1of 1

fci1 : TcxFilterCriteriaItem;

procedure TfrmPart.cxComboBox1PropertiesChange(Sender: TObject);


begin
cxTextEdit1.Text := '';
cxGrid1DBTableView1.DataController.Filter.BeginUpdate;
try
if fci1 <> nil then FreeAndNil(fci1);
fci1 := cxGrid1DBTableView1.DataController.Filter.Root.AddItem(cxGrid1DBTabl
eView1.GetColumnByFieldName(cxComboBox1.Text), foLike, cxTextEdit1.Text +'%', cx
TextEdit1.Text + '%');
finally
cxGrid1DBTableView1.DataController.Filter.EndUpdate;
end;
end;
procedure TfrmPart.cxTextEdit1PropertiesChange(Sender: TObject);
begin
cxGrid1DBTableView1.DataController.Filter.BeginUpdate;
try
try
if fci1 <> nil then FreeAndNil(fci1);
fci1 := cxGrid1DBTableView1.DataController.Filter.Root.AddItem(cxGrid1DBTa
bleView1.GetColumnByFieldName(cxComboBox1.Text), foLike, cxTextEdit1.Text +'%',
cxTextEdit1.Text + '%');
except
on E: Exception do
end;
finally
cxGrid1DBTableView1.DataController.Filter.EndUpdate;
end;
end;
procedure TfrmPart.FormCreate(Sender: TObject);
begin
cxGrid1DBTableView1.DataController.Filter.Root.Clear;
cxGrid1DBTableView1.DataController.Filter.Root.BoolOperatorKind := fboAnd;
cxGrid1DBTableView1.DataController.Filter.Root.AddItem(cxGrid1DBTableView1disc
ontinued, foEqual, 'False', 'False');
cxGrid1DBTableView1.DataController.Filter.Active := True;
procedure TfrmPart.FormShow(Sender: TObject);
begin
cxTextEdit1.SetFocus;
with cxDBPivotGrid1.DataController.Filter do
begin
Active := False;
Root.Clear;
Root.BoolOperatorKind := fboAND;
AddItem(nil, cxDBPivotGrid1tip_rezervare, foNotEqual, 'CIRCUIT', 'CIRCUIT'
);
Active := True;
end;