Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box in grid, lookup and display
Message
From
03/11/2000 21:11:02
 
 
To
03/11/2000 20:08:59
Spencer Redfield
Managed Healthcare Northwest, Inc.
Portland, Oregon, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00437864
Message ID:
00437947
Views:
24
>Thank you for your assistance. My grid's Combo Box behavior has improved. But the only way (yet) I've had any luck displaying descriptions is when combo.RowSourceType == 6 (fields) and the column's Sparse == .F.

RowSourceType = 6 works, too - just set the RowSource = "cuCursor.description,idfield"

Sparse should be .F.

>
>Such a Combo Box pretty much functions as I want IF combo.Style == 2 (dropdown list). But, where I "really" need to go, however, is combo.Style == 0 (dropdown combo) so I can enable the user to add brand new descriptions.
>

There will be a lot more coding for this - the Style=0 doesn't work as advertised (IMO). You have to make sure when the user enters something not in the list (RowSource) that it gets added to the list (RowSource). Otherwise, the next time you enter that record - the combobox will blank out it's bound field.

Also, how are you going to get the new info into the combo if you are storing the ID instead of the description? How's the user going to enter that?
Just asking...

>The problem: With Style == 2 the description is truncated to the length of the lookup ID as soon as the combo box column has had focus. Is there a way around this?

Set combo.ColumnWidths to something like "100" - wide enough to show the description field.
>
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform