Link to home
Start Free TrialLog in
Avatar of javagair
javagairFlag for United States of America

asked on

how do set items in a combo box on a datagridview

I can create a datagrid porgrammatically but can't figure out how to tell the combo box what items to display.
in some cases depending on who is logged in there will be 4 items to select and for other people there will be 5.
I could put 2 datagrids on the form and hide one, but I'd sooner create the datagridview when needed and set the combo box items as required before it is visible.
I have looked at numerous examples but either I am being really dense or they do not show what I'm trying to do.
what i need to do is create a datagrid view with a several text columns and one that has a combo box where they have to select the answer.
can someone point me to an example that does this????

Avatar of Ganapathi
Flag of India image

Are you trying to populate the Combo Box from database? Where do you have the data? In a Collection or a comma separated strings?
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

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


the original datagridview they are hard coded, which I don't want to do.
Now they are in a table and will be read with a query.

I just glanced over at the article and will read it completely, looks to be what I want to do.