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

Displaying checked items in Text of a ComboBoxExt

I''ve created a checked combobox control using ComboBoxExt as per your example. However I would like the Combo''s Text to display a comma seperated list of all of the items that the user has ticked from the list control. I feel this is a much more usefull and logical thing to display than just the last selected item. Using the list controls ItemCheck event I can create and update the comma seperated list everytime a check box is switched, however as soon as the dropdown is closed the ComboBoxExt Text reverts back to the text of the last selected item. Is there anyway to stop that from happening? Thanks.

3 Replies

AD Administrator Syncfusion Team July 21, 2004 08:29 PM UTC

Hi Paul, You could handle the ComboBoxExt''s DropDownCloseOnClick event as shown in the code snippet below for this purpose : private void comboBoxExt1_DropDownCloseOnClick(object sender, Syncfusion.Windows.Forms.Tools.MouseClickCancelEventArgs args) { string text = ""; foreach (object obj in this.checkedListBox1.CheckedItems) { if (text == "") text += obj.ToString(); else text += ", " + obj.ToString(); } this.comboBoxBase1.Text = text; } Please refer to the complete_sample attached here that illustrates this. Let me know if this meets your requirements. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


PM Paul McNally July 22, 2004 01:39 AM UTC

That sounds like the solution I''m after. Is the DropDownClose event new in version 2 of the controls? I''m using v1.6 here and ComboBoxExt only has a DropDown event.


AD Administrator Syncfusion Team July 22, 2004 09:50 AM UTC

Hi Paul, Yes, DropDownCloseOnClick is a recently added event. I am afraid, Essential Suite v1.6 is very old, and we strongly recommend you to upgrade to v2.0. Please open a DirectTrac incident in this regard, and I will update you with the download instructions for the latest v2.0 release. We appreciate your cooperation, and thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon