FIRST;
WHILE NOT EOF DO
The BEGIN
,,,
END
After such processing is the whole table, to remove the past see all are modified,
Unlike DBGridEh his filtering mechanism, is DBGridEh filter mode of a data set that
And CXGRID not, don't know how the unified change to filter out the data?
CodePudding user response:
Using CXGRID filter out data, it is on the basis of CXGRID data, through the filter again, let CXGRID show only the filtered data, but CXGRID data set and no filter, so you use the
With CXGRID1. The DataSource. DatsSet do
The begin
First;
While not Eof do
The begin
.
end;
end;
These are still no filtering data,
Suggest you use a process (or key event), filtered through the SQL statement, then you need to handle:
Procedure TFrm1. Button1Click (Sender: TObject);
Var: SQL string;
The begin
SQL:='select * from the name of the table Where (date & gt;='+ # 39 + s1 + # 39 +') and (date & lt;='+ # 39 + s2 + # 39 +') '.
DataModule1. ClientDataSet1. Active:=False;
DataModule1. ClientDataSet1. DataRequest (SQL);
DataModule1. ClientDataSet1. Active:=True;
With DataModule1. ClientDataSet1 do
The begin
First;
While not Eof do
The begin
.
end;
end;
DataModule1. ClientDataSet1. Active:=False;
end;
DataModule1 ClientDataSet1 this is C/S controls, you can use other data set of controls, such as: ADO data set of controls,