Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
After/BeforeRowColChange
Well, I'm guessing I'm not the first person to run into this. Perhaps somebody could share their experience in dealing with the awful ambiguities in the Grid's BeforeRowColChange and AfterRowColChange.
Mostly I'm trying to use BeforeRowColChange to trigger record level validation, but of course I don't want it firing as the user goes from cell to cell within a row.
I've subclassed the grid and added a property to track last known column. It seemed to me that I could compare this to the value passed to BeforeRowColChange, determine if it was a row or column being changed, and then validate where appropriate.
Also, in AfterRowColChange, I record the current column.
Alas, my record level validation is firing all of the time. The test I am using seems to simple to fail:
LPARAM nColIndex &&--Passed by VFP to BeforeRowColChange
IF nColindex = this.parent.nCurrentColumn
* Since new column equals old column, must be
* a row change, do validation here
ENDIF
Are there any known workarounds or general gymnastics for getting this to work?
As always, TIA.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement