Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid: how do I change a column from txt to combo?
Message
From
17/11/2006 06:41:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
16/11/2006 22:49:01
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01170582
Message ID:
01170623
Views:
13
>I'm real new to VFP, so bear with me :)
>
>I added a 6 column grid to a form. All 6 columns defaulted to textbox objects. I want to change the 1st column to be a combobox that pulls values from a lookup table. If user select a choice from combobox, I want to save that value to a field in the child table associated with grid...
>
>I assume I would only want a combobox in the column, not in addition to a textbox, right?
>
>So much to learn :)
>
>TIA

No you do not remove the textbox (you might but certainly not needed), I advice not to. Keeping the deafult textbox might even be better in cases (ie: both the displayed column and stored data are character like City names - then it's a high probability you'd want to try sparse = .t.).
If bound column of combo is of type numeric then set boundto .t.

Drop a combo onto your form. Set its general properties as you want first there (doing that when it is in a grid column is harder).

Ctrl+X - cut your combo from form
Ctrl+Click the grid (edit mode - or rigthclick edit)
Click the desired column
Ctrl+V - paste

Set column currentcontrol to your combo's name.
If you want the combo to show up all the time then set column's sparse to .F.

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform