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.
Unfortunately, activation email could not send to your email. Please try again.

Selected items in a list box are lost when

Thread ID:

Created:

Updated:

Platform:

Replies:

41671 Mar 8,2006 02:26 PM Mar 10,2006 12:11 AM Windows Forms 1
loading
Tags: FAQ
Administrator [Syncfusion]
Asked On March 8, 2006 02:26 PM

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 12:11 AM

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

CONFIRMATION

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.

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.

;