Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Event firing order problem in grid
In a navigation grid I am trying to keep the active row a few rows below the top. I also want a double click to change focus to page2 where editing occurs.
To accomplish it I initially did this:
1) In AfterRowColChange method I call a method that moves row to new position.
2) In DoubleClick() focus changes to page2.
Unfortunately, when person double clicked, AfterRowColChange fires before DoubleClick. As a result, when the second click occurs a different row is under the mouse, and the wrong record comes for edit.
To solve the problem, I was advised to place a delay in This.Click() for _DBLCLICK seconds while checking INKEY(.01,'M'). If a new click came in that time, This.Doubleclick is called. If the delay elapses normal behavior resumes including AfterRowColChange.
Now the problem is if user quickly clicks on two rows, meaning to navigate, the call from the INKEY loop fires DoubleClick and incorrectly send form to page2. I tried checking This.ActiveRow, but it doesn't seem to change while you are within the Click event!
Any suggestions?
Thank you very much.
Alex
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