Board index » delphi » dbCtrlGrid Bug

dbCtrlGrid Bug

I have discovered an annoying feature of the dbCtrlGrid.

When the dbCtrlGrid has to scroll on new panels in either direction it
will cause the associated dataset to fire a BeforeScroll event, followed
by an AfterScroll event, then more BeforeScroll events right in a row
without any AfterScrolls. If all data is visible (no panel scrolling)
you get the events as you would expect when changing records.

I am trying to program around this problem, but for what I am doing
there is nothing that is working for me.

Thanks for any help,
Mitch Godfrey
Day 1 Software

 

Re:dbCtrlGrid Bug


Quote
In article <37A63710.C2D1A...@konnections.com>, Mitch Godfrey wrote:
> When the dbCtrlGrid has to scroll on new panels in either direction it
> will cause the associated dataset to fire a BeforeScroll event, followed
> by an AfterScroll event, then more BeforeScroll events right in a row
> without any AfterScrolls. If all data is visible (no panel scrolling)
> you get the events as you would expect when changing records.

I suspect that this is by design, giving you chance to modify the display
of each entry.

Quote
> I am trying to program around this problem, but for what I am doing
> there is nothing that is working for me.

What are you actually trying to do?

 Mike Orriss (TeamB)
 (Unless stated otherwise, my replies relate to Delphi 4.03)
 (Unsolicited e-mail replies will most likely be ignored)

Re:dbCtrlGrid Bug


That can't be the reason because you always get two extra beforescroll events
no matter how many panels that are showing. So maybe there is a reason but I
seriously suspect it is an inadvertant behavior, and an unwelcome one at that.
If there are extra beforescroll events there also ought to be extra
afterscroll events.

I finally discovered another way to do what I am after but for other
programmers sake it this "behavior" ought to be documented. That will save
some hours discovering a program problem that works for most dbCtrlGrid
movements.

Thanks,
Mitch Godfrey

Quote
"Mike Orriss (TeamB)" wrote:
> In article <37A63710.C2D1A...@konnections.com>, Mitch Godfrey wrote:
> > When the dbCtrlGrid has to scroll on new panels in either direction it
> > will cause the associated dataset to fire a BeforeScroll event, followed
> > by an AfterScroll event, then more BeforeScroll events right in a row
> > without any AfterScrolls. If all data is visible (no panel scrolling)
> > you get the events as you would expect when changing records.

> I suspect that this is by design, giving you chance to modify the display
> of each entry.

> > I am trying to program around this problem, but for what I am doing
> > there is nothing that is working for me.

> What are you actually trying to do?

>  Mike Orriss (TeamB)
>  (Unless stated otherwise, my replies relate to Delphi 4.03)
>  (Unsolicited e-mail replies will most likely be ignored)

Re:dbCtrlGrid Bug


Quote
In article <37A704B0.D88F0...@konnections.com>, Mitch Godfrey wrote:
> I finally discovered another way to do what I am after but for other
> programmers sake it this "behavior" ought to be documented. That will save
> some hours discovering a program problem that works for most dbCtrlGrid
> movements.

OK, your comments provoked me to knock up a test case using the Delphi 5
trial I received from the Conference.

I could not get this to go wrong, so I tried my test on D4.03 and that
worked perfectly too.

If you do have a small test case that fails, you may zip it up and e-mail it
for me to test, if you wish.

 Mike Orriss (TeamB)
 (Unless stated otherwise, my replies relate to Delphi 4.03)
 (Unsolicited e-mail replies will most likely be ignored)

Re:dbCtrlGrid Bug


A test app is on the way.

Thanks,
Mitch Godfrey
Day 1 Software

Other Threads