Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox in grid problem
Message
From
12/06/2014 08:52:23
 
 
To
11/06/2014 23:14:46
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01601754
Message ID:
01601770
Views:
66
>Hi,
>
>I have a form with a grid, the grid setup as follows
>The column4 is a combobox control, it is a unit table for selection.
>I set the ControlSource of the column4 is order.unit, Bound = .F., Sparse = .F.
>The ControlSource of the combobox in Column4 is unit.unitcode, RowSource = unit.unitcode, RowSourceType = 6
>
>As a result the Combobox can't show out pull down list let me to select the unit code.
>Where is my problem ?
>Please advise.
>
>
>WITH thisform.Pageframe1.Page1.grdOrder
>        .RecordSource = "order"
>        .DeleteMark = .F.
>        .Column1.ControlSource="order.itemcode"
>        .Column1.ReadOnly=.F.				
>        .Column1.Header1.Caption="Item Code"
>	
>        .Column2.ControlSource="order.qty"
>        .Column2.ReadOnly=.F.
>        .Column2.Header1.Caption="Qty."
>		
>        .Column3.ControlSource="order.unit"
>        .Column3.ReadOnly=.F.
>        .Column3.Header1.Caption="Unit"
>
>        .Column4.ControlSource="order.unit"
>        .Column4.ReadOnly=.F.
>        .Column4.Header1.Caption="Unit Table"
>
>        .Column4.cbounit.ControlSource="unit.unitcode"
>        .Column4.cbounit.RowSource=unit.unitcode
>        .Column4.cbounit.RowSource.type=6 
>
>ENDWITH
>
>

In a grid, you set the ControlSource either for the column or for the control in the column, not both. For a combo, ControlSource and RowSource need to come from different tables. I suspect all you need to do here is reset the combo's ControlSource to Default.

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform