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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Selected items in a list box are lost when

Thread ID:





41671 Mar 8,2006 07:26 PM UTC Mar 10,2006 05:11 AM UTC WinForms 1
Tags: FAQ
Administrator [Syncfusion]
Asked On March 8, 2006 07:26 PM UTC

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!

Administrator [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon