>Not quite. I have a invm table with an ittyid field. In the grid I want the ittyid column to show the appropriate itty.cname field even with Grid1.Column1.Sparse = .T.
>
>Wouldn't you expect a grid with a ComboBox to act like this?
No, I woldn't. I think that you want to dive a user possibility to change data right in a Grid. The VFP Gurus says that is the "bad way". In my apps I doing follow.
For example, I have two tables: Products & Suppliers.
Products: pCode I, pName C(50), pSupplier I.
Suppliers: sCode I, sName C(50).
I have persistant relation between pSupplier->sCode.
Well, I make a form with Grid and three columns.
Grid.RecordSource = "Products"
Grid.ReadOnly = .T.
Grid.Column1.ControlSource = "pCode"
Grid.Column2.ControlSource = "pName"
Grid.Column3.ControlSource = "Suppliers.sName"
All columns has TextBox as CurentControl, and user see:
101 Potato Ingman
201 Broccoli Ardo
202 Vegetables_mix Ardo
On the form I place CommandButton "Edit". In the cbtEdit.Click() launch a new form for editing current record and in this form place three objects:
pCode - TextBox
pName - TextBox
pSupplier - ComboBox
ComboBox properties:
RowSourceType = 6 - Fields
RowSource = "Suppliers.sName,sCode"
BoundColumn = 2
BoundTo = .T.
Style = 2 - DropDown
ControlSource = "Products.pSupplier"
If user push "Save" button than Begin Trans, TableUpdate() etc.
If "Drop" - TableRevert().
In this way user don't know about codes, relations and other programist troubles, but see all he want.
HTH
Regards,
Dmitri Alexandrov