Board index » delphi » Newbie Question(TTable, TQuery)

Newbie Question(TTable, TQuery)

I am just learning Delphi and have been a Paradox ObjectPal programmer
for a while.  I want to be able to manipulate a filtered data set behind
the scenes like a Tcursor in Paradox.

For example, I have a TDBGrid on a form and allow the user to filter the
table.  I want to have a total field at the bottom that will show a
column total of the 'filtered set'.  I also would like to be able to
pass this 'filtered' dataset to another form and there again process
each record without the Cursor Position on the Grid moving.

I have looked at lots of examples but they never seem to show how to do
this. There is one example where they calculate a total on the fly, but
you can see it go though every record on the grid. This too slow and
want this to be transparent to the user.

If someone could give me an example, or set me straight on this I would
appreciate it.

John Hartman

 

Re:Newbie Question(TTable, TQuery)


One possibility is DisableControls, loop through the dataset, find your
original place (Bookmark?) and then EnableControls. In theory the dbGrid
should not appear to change.

Quote
> "... There is one example where they calculate a total on the fly, but
> you can see it go though every record on the grid. This too slow and
> want this to be transparent to the user... "

--
Steve Moran
Flying Objects Ltd, London.
--
Note: When replying please delete the first dot from my return address.

Other Threads