Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populate column of datagrid as combo box

Status
Not open for further replies.

Imbriani

Programmer
Jan 9, 2004
195
US
Hi!

I have a main form with a datagrid. I would like to turn each of the columns of this datagrid into combo boxes that would offer the user a limited selection based on the selection of an option button. I know the buttonclick event will be involved and I'm thinking to run SQL on this buttonclick event but I can't quite work how to populate the column once the SQL is processed. Any ideas?
 
Hey!

Did you try the DBCombo control? You can use it in conjunction with adodc control. You could also use ordinary combo box and populate it using ADO.

If you need any further help let me know!

-Gregor

---------------------------------
LendPoint Software
 
Hi Gregor,

I an unfamiliar with the DBCombo, although I did go to the application and find the component. Can you give me a quick synopsis of what it does? There's nothing in my books about this.

My problem is that I am working with tables related with one to many relationships. When a record is displayed, all of the entries for the table with the "many" relationship need to show and I can find no way to do this except use a datagrid. But, I have been unable to find a way to make each field of the displayed datagrid function as a combo box. Does this make sense?

Kathy
 
I suggest you try using the MSFlexgrid control which as the name suggests is more flexible than the DBGrid.

Take a look at this faq222-3262

Towards the end it specifically deals with overlaying cells with controls such as a combo box

Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top