Avatar of Larry Brister
Larry Brister
Flag for United States of America asked on

WinForms Dynamically created DropdownList

Working with WinForm .Net 4.x project  

I have a Form with a dropdownlist on it named ddlHoliday1

What I want is on selection made from the ddl,
Dynamically add another ddl right below it.
When that one has a selection made...do it again
Up to a total of 7 Dropdown lists.
Visual Basic.NET.NET ProgrammingMicrosoft Development

Avatar of undefined
Last Comment
Larry Brister

8/22/2022 - Mon
Éric Moreau

do you really need to create them dynamically or just set there content according to the previous one?

in the case the second option is enough, check http://emoreau.com/Entries/Articles/2007/01/Setting-a-masterdetail-relationship-between-two-ComboBox.aspx
Larry Brister


I guess the point is I don;t want 7 ddl's cluttering up the form unless they get used.

I suppose I could create them all...sstack them somewhere...and then make visin;e and position on click or previous ddl?
Éric Moreau

you can always play with there visible state on the fly.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
Mike Tomlinson

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
Larry Brister

YAY!  WHoopie! Attaboy!  Hot Dog!  Way...to...go!

Uhhhhh...remind me to buy you a sody-pop sometime.