FoxInCloud
wActiveColumn
Gravatar is a globally recognized avatar based on your email address. wActiveColumn
  Vincent H.
  All
  Nov 15, 2019 @ 05:20am

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
Gravatar is a globally recognized avatar based on your email address. re: wActiveColumn
  FoxInCloud Support - Thierry N.
  Vincent H.
  Nov 15, 2019 @ 09:39am

.wActiveColumn must return 0 when grid does not have focus.

You can change the default value of .wActiveColumnat design time in your xxxGrd sub-class

Gravatar is a globally recognized avatar based on your email address. re: wActiveColumn
  Vincent H.
  FoxInCloud Support - Thierry N.
  Nov 15, 2019 @ 09:48am

OK, but my grid necessarily has the focus with wAfterRowChange () no ?

Gravatar is a globally recognized avatar based on your email address. re: wActiveColumn
  FoxInCloud Support - Thierry N.
  Vincent H.
  Nov 15, 2019 @ 09:49am

yes but events in ActiveWidget grid fire in a different order than VFP

Gravatar is a globally recognized avatar based on your email address. re: wActiveColumn
  Vincent H.
  FoxInCloud Support - Thierry N.
  Nov 15, 2019 @ 09:57am

You can change the default value of .wActiveColumnat design time in your xxxGrd sub-class

It's works fine !

Thanks

© 1996-2019