سؤال

I have an TRxQuery in Delphi 5 (which descends from TQuery) bound to a grid. I'm adding a filter edit box and want to filter the grid as the user types. Is there a way to filter the dataset without closing and reopening the query as this causes an unwanted flicker.

Many thanks

هل كانت مفيدة؟

المحلول

Procedure SetFilter(DS:TDataset;Const Filter:String);
begin
   DS.Filtered := false;
   DS.Filter := Filter;
   DS.Filtered := true;
end;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top