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

How to programatically select items in a multiselect ComboBoxBarItem

When I programatically select items in a (multiselect) ComboBoxBarItem control by callling the ListBox.SetSelected method, the text displayed in the underlying Textbox remains blank. If the user selects items using the mouse, however, this gets populated with one of the items that is selected.

How can I make sure that the control behaves the same way as it would if the user were to select items using the mouse, but programatically?


3 Replies

JJ Jisha Joy Syncfusion Team February 6, 2008 01:09 PM UTC

Hi Andrew,

Thank you for posting your query to us.
I am afraid that I was not able to reproduce the issue. I have created a simple sample to test this issue and it is available in the following link.
http://www.syncfusion.com/support/user/uploads/ComboBarItem_70247098.zip

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample or send us the reproducing steps so that we could sort out the cause of the issue and provide you a solution?
Regards,
Jisha







AN Andrew February 6, 2008 06:35 PM UTC

Thanks for your reply.

This was the key statement that I was missing:

this.comboBoxBarItem1.TextBoxValue = this.comboBoxBarItem1.ListBox.Text;



JJ Jisha Joy Syncfusion Team February 7, 2008 06:01 AM UTC

Hi Andrew,

Thank you for your update. Glad to hear that the issue has solved.
Thank you for using Syncfusion Products.
Regards,
Jisha




Loader.
Live Chat Icon For mobile
Up arrow icon