FoxInCloud
wActiveColumn
Hi Thierry,
I'm using wActiveColumn in the wAfterRowChange () method.
At the 1st line change, wActiveColumn = 0, which can cause an error.
An example below. Without the correction of wActiveColumn, it's failed.
.wAfterRowChange()
LPARAMETERS tuRow && see documentation in awGrd.wAfterRowChange()
IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)
RETURN .T.
ENDIF
IF !DoDefault(@m.tuRow)
RETURN
ENDIF
WITH THIS.Parent
IF THIS.wActiveColumn = 0
THIS.wActiveColumn = 1
ENDIF
.Valgrid.Texte.Value = EVALUATE (THIS.Columns(THIS.wActiveColumn).ControlSource)
.Valgrid.Texte.SetFocus
.Refresh
ENDWITH
.wActiveColumn
must return 0 when grid does not have focus.
You can change the default value of .wActiveColumn
at design time in your xxxGrd
sub-class
OK, but my grid necessarily has the focus with wAfterRowChange ()
no ?
yes but events in ActiveWidget grid fire in a different order than VFP