Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid combobox
Message
From
23/03/2005 15:31:33
 
 
To
23/03/2005 11:30:51
Sid Meyers
Omegaware Consulting, Inc.
Minnesota, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00998476
Message ID:
00998614
Views:
26
I've tried for a couple days to get this combobox in a grid to work but just can't seem to get it.
.Text1.Controlsource = "(IIF( SEEK( tqDispatch.pcDrv_id, 'driver', 'driverid' ), driver.lastname , '' ))"
This makes the grid column read only. The only way you will be able to get the combo box to be updateable is if it is style=2-DropDown List because RaedOnly applies only to the portion of a control that accepts text. So if the control is a drop down list, you can still select a new value. If it is a drop down combo, you can't. I believe the class that you are using is a drop down combo.

If you must be able to add new entries to the combo on the fly, and you want to use this class, you need to denormalize the grid's recordsource to include the descriptive text and bind the grid column to that. The way the class works is that it updates the foreign key behind the scenes.

Why don't you grab the "How to put a combo in a grid" white paper and sample code from my web site. The working examples in the presentation should help you find a solution.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform