Subject Re: [IBO] IB_Grid
Author Paul Vinkenoog
Hi Harald,

> * take a ib_grid and size it so, that a few rows (e.g. 5) are visible
> * bind to it a dataset with more rows than the visible gridrows
> * move to the first row and enter edit state
> * do not post the changes !
> * now scroll with the slider down to one of the unvisible rows, (e.g. row 10)
> * try to edit the row
>
> - you will end up to edit a different row than you expected to.
> There is a mismatch in locating the right datarow.
>
> I spent a few hours to get in the code, but I wasn´t able to fix it :-(
>
> So, IBO Power-Developers - is anyone able to fix this ugly bug ?

I came across something similar recently: after a DisableInterface -> do
lots of stuff with dataset -> EnableInterface sequence, the grid showed
another current row than the other controls. If I clicked another row in
the grid, it showed the CurrentRowColor but so did the "old" one, giving
me two "current" rows.

If I clicked the other controls one by one, the value of the clicked control
changed instantaneously to the corresponding value in the grid row (so the
grid was "right" about the current row, at least if it wasn't showing two
of them ;-)).

This behaviour was fully reproducible. I hadn't time to really dig in the
IBO source, so I worked around the problem by calling DataSource->Reset
after EnableInterface().

A user even reported that she saw double rows in the same app, ie two rows
with the same data above each other, then two rows with again the same
data (but different from the previous pair), etc.
They were not in the database itself however (would have been impossible
too, due to unique constraints) and I haven't been able to reproduce that.

> If you need a demo appl. to demonstrate the bug, please let me know.

Would like to see it, preferably with source code, but binary only is
welcome too.

BTW this doesn't mean that I'm going to do something about it... but the
more we see from each other where things go wrong, the more we combine our
knowledge and the better the changes that problems can be fixed.


Greetings,
Paul Vinkenoog