Link to home
Start Free TrialLog in
Avatar of gianluca
gianluca

asked on

polyform table (grid)

I need a table (maybe a grid) with 5 column in which some column are text and the others are combo-box; I also need to enter new rows like a DBgrid. I think something like the "Object Ispector", 2 colunm with different king of components inside (text, combo-box,ect.ect.); but I also need to insert more rows.
Avatar of Greyman
Greyman

Hopefully, your picklists are stored in datasets.  (A ClientDataSet is ideal for this sort of thing.)  Assuming that they are, the answer is to:

Double-click the dataset that is being displayed in the DBGrid to get the fields editor.

Right-click it and Add Fields.  Add all of the fields that it suggests.

While more combo-based fields need to be added do begin:

Right-click again and select New Field.
Add a lookup field - it has properties that are very similar to a DBLookupCombo.

Double-click your DBGrid to get the columns editor, and make sure that the column subject to lookup is not there, and that the lookup field is.

end {while};

F9 :)
Avatar of kretzschmar
? do you mean a special stringgid ?
? do you have an underlying dataset ?
Aha, I misread you a bit, and pasted my answer to the guy who wanted drop-down combos on his dbgrid.

You might be better off with a dbControlGrid - that allows you to put most dbcontrols onto it - unfortunately they all have to connect to the same DataSource
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial