Avatar of javagair
Flag 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????

Visual Basic.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon

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

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

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.

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck