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

Check Boxes in Combo box

2 Answers 61 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 2
Andy Green asked on 04 Apr 2011, 04:53 PM
I have a Radcombo box with check boxes this is my markup:

 

<telerik:RadComboBox ID="ddlSpecialty" runat="server" AutoPostBack="true" AppendDataBoundItems="true" EnableEmbeddedSkins="false" Skin="Activity" Width="185px" Height="300px" emptyMessage="Click to change Specialties" >

 

 

 

<ItemTemplate>

 

 

<asp:CheckBox ID="chkSpecialty" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" AutoPostBack="true"></asp:CheckBox>

 

 

<asp:Label ID="lblSpecialty" runat="server" AssociatedControlID="chkSpecialty"><%#Eval("Specialty") %></asp:Label>

 

 

</ItemTemplate>

 

 

 

</telerik:RadComboBox>

 


What I can't do is this:

If one check box is selected then show that value in the radcombobox, but if more than one is selected then have the words 'Multiple Selected' be displayed.

Can anyone offer any help on this.

Andy

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Apr 2011, 07:35 AM
Hello Andy,


I found code libraries, using checkboxes inside RadComboBox. I hope tis would shed some light on achieving your functionality.
Using CheckBoxes for multi-item selection, complete solution
RadComboBox Advanced Multiple Selection



Regards,
Princy.
0
Dimitar Terziev
Telerik team
answered on 08 Apr 2011, 08:04 AM
Hi Andy,

When multiple selection is implemented usually the values are stored in the Text property of the RadComboBox, which is in fact the text shown in the input. Since you want to show a message once more than one item is selected, my suggestion is to use a hidden input on the page to store these values.

Best wishes,
Dimitar Terziev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Andy Green
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Dimitar Terziev
Telerik team
Share this question
or