How about just copying the field to a listbox everytime Accept := true? --- On Wed, 10/22/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Subject: Re: [delphi-en] Immediate grid update when dataset is filtered? To: [email protected] Date: Wednesday, October 22, 2008, 12:31 PM Yes, this is more or less what I tried. Every time a record was found, call Application. ProcessMessages No joy. > You could try counting the executions of OnFilterRecord with a form variable and doing an > application. processmessages every few hundred passes of the filter code. I'd be curious if that works so please repost if it does. Thanks. > > Dave > > --- On Wed, 10/22/08, Theodoros Bebekis <teo.bebekis@ gmail.com> wrote: > > From: Theodoros Bebekis <teo.bebekis@ gmail.com> > Subject: Re: [delphi-en] Immediate grid update when dataset is filtered? To: [EMAIL PROTECTED] ps.com > Date: Wednesday, October 22, 2008, 1:55 AM > > O/H [EMAIL PROTECTED] com Ýãñáøå: >> Delphi 5. >> Have a TDBGrid attached to a TDataset. >> The dataset has a custom filter ie >> procedure TForm1.OnFilterReco rd(DataSet: TDataSet; var Accept: Boolean); > ... >> Sometimes, the filter will only pick out a handful of records from a large >> dataset. Say 7 records. >> I notice the grid does not display any entries until all 7 have been found >> (the grid contains more than 7 rows). To find all 7, the entire file has >> been scanned. >> Is there a way to update the grid immediately: as soon as OnFilterRecord >> has returned Accept=true ? >> That is, the grid would populate rows (plop, plop, plop) as the entire file was scanned and each of the records found. The user could then CANCEL >> when they saw their record come up. Instead of waiting for the entire file >> to be filtered/scanned. >> Dataset.Refresh starts the while process over again: that is not what I want. >> Feels like I want a "grid.refresh" method: an > Application. ProcessMessages >> sort of thing, to ensure the grid is actually displaying the record which >> I know has just been accepted in OnFilterRecord. >> Is there a trick, or am I deluding myself, and should take a different approach... ? >> Many thanks in advance. > > Hi > > the Filter/Filtered/ OnFilterRecord set > works more or less the way you describe. > > It seems that this is not the functionality you really need. > > From what you describe I understand (possibly I'm wrong) > that you want an operation where > 1. a kind of filtering is applied to the rows of a dataset > testing the rows one by one > 2. when a row passes the test, it is moved to SECOND dataset > and displayed to a second grid. > > If the above is correct, then you have to code it by yourself. > The filtering capabilities of the TDataset do not cover that > kind of functionality. > > > -- > Regards > Theo > > ------------ --------- --- > Theo Bebekis > Thessaloniki, Greece > ------------ --------- --- > Greek_Delphi_ Prog : a Delphi Programming mailing list in Greek at > http://groups. yahoo.com/ group/Greek_ Delphi_Prog > > CSharpDotNetGreek : A C# and .Net mailing list in Greek language at > http://groups. yahoo.com/ group/CSharpDotN etGreek > > atla_custom : a Unisoft Atlantis Customization mailing list at > http://groups. yahoo.com/ group/atla_ custom > ------------ --------- --- > > ------------ --------- --------- ------ > > ------------ --------- --------- --------- --------- ----- > Home page: http://groups. yahoo.com/ group/delphi- en/ > To unsubscribe: delphi-en-unsubscri [EMAIL PROTECTED] comYahoo! Groups Links > > > > > > > > > [Non-text portions of this message have been removed] > > > ------------ --------- --------- ------ > > ------------ --------- --------- --------- --------- ----- > Home page: http://groups. yahoo.com/ group/delphi- en/ > To unsubscribe: delphi-en-unsubscri [EMAIL PROTECTED] comYahoo! Groups Links > > > > [Non-text portions of this message have been removed]

