Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid seems to loose track of what row it´s on (VFP6 /SP3
Message
From
03/07/2000 03:50:19
 
 
To
30/06/2000 12:26:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00387036
Message ID:
00387671
Views:
15
>>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

Quite possibly, but how?

Peter
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform