Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't add an 'extra' column to a grid
Message
 
 
To
29/04/1998 05:59:20
Steve Camsell
Windmill Associates
Bath, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00095610
Message ID:
00095653
Views:
22
Steve,

Processing the view is indeed trivial. I have an app right now where I give the endusers the ability to set the default value for there cbos, where the cbo values are limited to what's in a codes table. Only one of the items can be selected, so the code in the grid's checkbox.Click:

local i

i = recno( "DefaultCodes" )
replace all DefaultCodes.lDefault with .f. && clear the field for all rows
goto i in DefaultCodes
replace lDefault with .t. && set the field for the selected row

replace default.iCode with DefaultCodes.iID && update the default value

It works pretty slick. It also needs code in the KeyPress, MouseDown and MouseUp to NODEFAULT if it's already checked so they can't uncheck all items one of them has to be selected.

>You are right on the money with that solution, it works perfectly and there is no 'mess' and nothing to 'tidy up' afterwards. It also means that I can process the view afterwards, instead of processing the grid, much easier!
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform