Discussion:
Grids, Again
Gene Wirchenko
2018-04-18 19:06:46 UTC
Permalink
Hello:

I now have the time to dig into grids again. I hope this lasts
long enough for some real results. I took a look yesterday at "1001
Things ...", chapter 6 (Grids: The Misunderstood Controls). The
number of gotchas is quite high.

I find one particular thing especially weird. Why, oh why,
does BeforeRowColChange fire before the active cell's Valid and LostFocus fire?

To me, it seems obvious that the most likely reason why one
would deny a row-col change is because the active cell's validation
failed. I will go further: why else would one deny a row-col change?


My previous approach has gotten horribly baroque and still was
not enough.

There are nasty things happening such as 1) the current
control's value not being assigned until after the
BeforeRowColChange, 2) the validation using the previous value when I
try to correct after some errors (but not always) but only for the
first time, and it goes on.

Correct one problem, and something else breaks.


I am wondering if anyone would be willing to write a simple
example of a grid IN CODE to a spec I provide. This is the example
that I am trying to implement. Maybe, I am overlooking something
crucial. I sure have not seen any examples of grids other than trivial.

Sincerely,

Gene Wirchenko



_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mtlp000086
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Fernando D. Bozzo
2018-04-20 05:32:13 UTC
Permalink
Hi Gene:

Those events do not occur after RowColChange because you can use
RowColChange as a general validation event that works for existent objects
and for dynamically added one.

Think of it as the KeyPress of the form, that prevail to the objects
Post by Gene Wirchenko
I now have the time to dig into grids again. I hope this lasts
long enough for some real results. I took a look yesterday at "1001
Things ...", chapter 6 (Grids: The Misunderstood Controls). The
number of gotchas is quite high.
I find one particular thing especially weird. Why, oh why,
does BeforeRowColChange fire before the active cell's Valid and LostFocus fire?
To me, it seems obvious that the most likely reason why one
would deny a row-col change is because the active cell's validation
failed. I will go further: why else would one deny a row-col change?
My previous approach has gotten horribly baroque and still was
not enough.
There are nasty things happening such as 1) the current
control's value not being assigned until after the
BeforeRowColChange, 2) the validation using the previous value when I
try to correct after some errors (but not always) but only for the
first time, and it goes on.
Correct one problem, and something else breaks.
I am wondering if anyone would be willing to write a simple
example of a grid IN CODE to a spec I provide. This is the example
that I am trying to implement. Maybe, I am overlooking something
crucial. I sure have not seen any examples of grids other than trivial.
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAGQ_JumKsh2ZcMT=KKzd=HwEqvOG+***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages f
Gene Wirchenko
2018-04-20 16:34:39 UTC
Permalink
Hi Gene: Those events do not occur after RowColChange because you
can use RowColChange as a general validation event that works for
existent objects and for dynamically added one. Think of it as the
KeyPress of the form, that prevail to the objects
Yes, but most of my trouble comes from having to work around
BeforeRowColChange. Because the input object's Valid does not fire
until after, I have to call the input object's validation from the
BeforeRowColChange. I end up having to deal with the quirks of
BeforeRowColChange, and there are lots.

[snip]

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mtlp000086
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Loading...