This is a migrated thread and some comments may be shown as answers.

[Solved] RadComboBox MultiSelection using Checkboxes Question

2 Answers 140 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Casey
Top achievements
Rank 1
Casey asked on 28 Oct 2009, 12:09 PM
Hello,

I've seen the code library on how to create a RadComboBox with multiselection and checkboxes. However, all the examples I found show the RadComboBox with multiselection via checkboxes having its items added manually in the RadComboBox definition, or by adding the items via the code-behind. Is it possible to achieve this same functionality when populating the RadComboBox via a SqlDataSource? I tried adding an ItemTemplate with the checkbox, but when I click the drop down there appears to be a list of checkboxes for the number of items returned by the datasource; however, there are no other items displayed. Where the text should be for the items, it is blank. So, I have a RadComboBox with a list of checkboxes that appear to be for no values. When I click on one of the 'blank' items, the actual item text is reflected in the RadComboBox's input field.

Please let me know if it is possible to create a RadComboBox with multi selection via checkboxes, while populating the combobox via a SqlDataSource. If so, any tips on how to achieve this would be appreciated.

Thanks,
Casey

2 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 30 Oct 2009, 02:52 PM
Hello Casey,

Just call the DataBind() method of the RadComboBox in page_load event to apply the item template.

Sincerely yours,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Casey
Top achievements
Rank 1
answered on 02 Nov 2009, 02:24 PM
Veselin,

I tried that, but it did not work. The checkboxes were still listed and all of the items were blank, but when a checkbox was selected the input area of the combobox was populated with the selected value. I ended up switching from a RadComboBox to a RadGrid. It met my needs more than the RadCombobox.

Thanks,
Casey
Tags
ComboBox
Asked by
Casey
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Casey
Top achievements
Rank 1
Share this question
or