Einzelnen Beitrag anzeigen

danten

Registriert seit: 19. Feb 2012
Ort: Czech Republic, Prag
126 Beiträge
 
Delphi 10.1 Berlin Architect
 
#12

AW: DBGrid filtering

  Alt 15. Aug 2012, 17:12
OK,datamodule:
Delphi-Quellcode:
procedure Tdm.tab_dodavatelFilterRecord(DataSet: TDataSet; var Accept: Boolean);
var
 f:TField;
begin
  f := Dataset.FieldByName('Firma');
  Accept := (Length(f.AsString)>0) and (f.AsString[1] > frm_export.sEdit1.Text) and (f.AsString[1] <= frm_export.sEdit2.Text);
end;
MainForm:
Delphi-Quellcode:
procedure Tfrm_export.sButton1Click(Sender: TObject);
var
  Accept: boolean;
begin
  with (dm.ds_distributor.DataSet) do begin
    Filtered := False;
    dm.tab_dodavatelFilterRecord(dm.ds_distributor.DataSet,Accept);
    Filtered := True;
  end;
end;
Where is the letter 'A'?
Miniaturansicht angehängter Grafiken
dbgrid.png  
Daniel
  Mit Zitat antworten Zitat