Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lookup Combo in Grid
Message
From
05/07/2006 10:10:42
 
 
To
05/07/2006 06:06:33
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01133757
Message ID:
01133819
Views:
19
It works fine if I set the Sparse setting of column = .f. but I want to have the combo visible only if the customer click in row, this works if I set the sparse setting to .t. but the value displayed in column is obviusly the code and not the descriprtion is there any solution or idea for this situation.

Providing that your combo box is a drop down list - style=2:

Set up the ControlSource for the column as follows:
( IIF( SEEK( table.code, [name], [code] ), name.descritpion, [] ) )
Don’t forget to set the column’s Bound property to false when using this technique.

At this point you are probably saying to yourself “Hang on, there! Setting up the column’s ControlSource like that has the side effect of making the column ReadOnly!” and you would, in fact, be correct. However, you can still drop the list and make changes. The reason for this is that the ReadOnly attribute applies only to the portion of a control that accepts text. Since a drop down list does not accept text, it cannot be made read only (any more than a command button could be made read only). Fortunately, this behavior is documented and is by design so it is unlikely to change in future releases of the product.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform