Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid seems to loose track of what row it´s on (VFP6 /SP3
Message
De
30/06/2000 12:26:52
 
 
À
30/06/2000 09:47:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00387036
Message ID:
00387152
Vues:
13
>Let's assume a grid with 2 columns.
>Column1's CurrentControl is a checkbox.
>Column2's CurrentControl is a spinner.
>The spinner should only be enabled if the checkbox is checked.
>
>The code in the spinner GOTFOCUS method is:
>THIS.ENABLED=THIS.PARENT.PARENT.COLUMN1.VALUE, i.e. .T. if the checkbox is checked, otherwise .F.
>
>This works initially to some degree, but as soon as I click on a checkbox it stops working for all spinners in the grid, and no amount of refreshing or what have you will get it back on track.
>
>I have had a similar problem once with calculations (Col3.Txt1.Value=Col2.Txt1.Value * .Col1.Txt1.Value) and solved id by
>looping through the Columns and setting the CONTROLSOURCE property in the AFTEROWCOLCHANGE method.
>
>LPARAMETERS nColIndex
>FOR i=1 TO THIS.COLUMNCOUNT
> THIS.COLUMNS(i).CONTROLSOURCE=THIS.COLUMNS(i).CONTROLSOURCE
>ENDFOR
>
>Regards
>
>Peter

I would think that by placing the proper code in the Click of the CheckBox and the Grid AfterRowColChange event to Enable/Disable the spinner plus judicial use of the Sparse property and some tweaking, you should be able to get this to work quite well.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform