Wednesday, 4 September 2013

How to hook after a query is executed?

How to hook after a query is executed?

I am using AnyDac and TMS TAdvDbGrid (rather than plain TDbGrid), in case
that makes any difference, but I suspect that there is a general solution.
I have a data aware grid, which should display a maximum of say 12 lines
because of screen size. If the associated query returns less than 12 rows
then I would like to change the DB Grid's height property accordingly
(leaving some empty space below the newly poisiotned bottom og the grid,
rather than within it).
I can post the code for that if requested, but my question is what event
handler should I do it in?
I had thought to use the Query's AfterOpen() handler, but that is never
trigeered.
What else is there? I could use the DB Grid's DrawCell() method, but that
would be called frequently.

No comments:

Post a Comment