Hello,
I have a RadComboBox with a multi-checkbox setup. It is working fine but when try loop through the items and see if anything has been selected it is showing FALSE even when I have definitely selected some items.
My code is as follows:
I have a RadComboBox with a multi-checkbox setup. It is working fine but when try loop through the items and see if anything has been selected it is showing FALSE even when I have definitely selected some items.
My code is as follows:
foreach (RadComboBoxItem rcbi in cmbAccessories.Items) |
{ |
if (rcbi.Selected) |
{ |
//insert value in database |
} |
} |
<telerik:RadComboBox ID="cmbAccessories" Width="200px" |
OnClientDropDownOpening="OnClientDropDownOpening" |
EmptyMessage="...Select Accessories" |
OnClientDropDownClosing="OnClientDropDownClosing" |
OnClientSelectedIndexChanging="OnClientSelectedIndexChanging" |
OnClientBlur="OnClientBlur" DataTextField="Name" DataValueField="AccessoryID" |
ValidationGroup="valItem" HighlightTemplatedItems="false" |
AllowCustomText="True" Runat="server" ShowDropDownOnTextboxClick="False" |
EnableTextSelection="False"> |
<ItemTemplate> |
<asp:CheckBox ID="chkBox" Text='<%#Eval("Name") %>' onclick="checkboxClick();" runat="server" /> |
</ItemTemplate> |
<FooterTemplate> |
<div style="width:100%;" align="center"><asp:Label ID="lblCloseMe" Text="CLOSE [X]" onclick="CloseMe();" style="cursor:pointer;" runat="server" /></div> |
</FooterTemplate> |
</telerik:RadComboBox> |