Let’s say I have a WinForm that has a menu strip in it. Let’s say one of the items of this menu strip is named Cars.
Whenever I open my WinForm, I want to add a subitem under Cars for every car in a table.
Is this possible to do with code?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Note: If you add an event to the subItem, make sure you unsubscribe to that event if you are refreshing the list repeatedly, otherwise you will have a memory leak.
Note2: If you have many items you should use
DropDownItems.AddRangeinstead for performance reasons.