We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Selected items in a list box are lost when

I have a window form that opens another form as a modal dialog form. In the modal form, I have C# codes that select all list box items existing in a list box, which works fine. But as soon as the modal form is opened from the first form, all the list box selection is lost. Do you know what I need to do in order to keep the list box items selected? Thanks!

1 Reply

AD Administrator Syncfusion Team March 10, 2006 05:11 AM UTC

Hi, Try to give a listbox selecting all items code in Form2 constructor after InitializeComponent method calling statement, public Form2() { InitializeComponent(); this.listBox1.SelectionMode=SelectionMode.MultiExtended; for(int i=0;i I hope this will help you. Thanks, Vijay

Loader.
Live Chat Icon For mobile
Up arrow icon