PDA

Click to See Complete Forum and Search --> : Grid cell contents question ...


Lil Dave
Jan 19th, 2000, 01:18 PM
Sorry about the broad subject line ... :)

In VB 3, with TrueGrid Professional, you had the option where you could tie records in a fields to display the appropriate records from another table.

e.g.
1 = Ordered
2 = Installed
3 = Not Installed
4 = Pending

so when the grid saw a 2, it would automatically look up the table and show 'Installed' instead of the 2. As I recall it was preloaded in the Form_Load() event. You could then convert it into a drop down box and select the appropriate value from it.

In VB 5, does the DBGrid or the MSFlexGrid do this ... if so how.

My 'band aid' method is to disable the grid and position a DBList or DBCombo control exactly over the current cell then once the value is selected, hide the control and reactivate the grid to show the value selected.

There must be a better way ...

Cheers Dave

Clunietp
Jan 19th, 2000, 01:56 PM
if you are manually populating the grid, you could look up the value manually and use that as the value for the field....or use a joined recordset and do not select the foreign key field (the number field)

pardede
Jan 20th, 2000, 02:44 AM
I have exactly the same thing to deal with.
And my approach is the same, using a combobox appearing on top of the cell and dropdown the list. Anyone have better idea?

By the way.. could you not use your truegrid in your new version of VB? I don't have truegrid available so I can't check that