Posted 06 Apr 2018 Link to this post
Hi,
I have a RadComboBox which has an extra "Select All"-type item to select a sub set of all items. When this item is checked and the combobox is closed, I would like for the counter to ignore it when displaying how many items are checked.
e.g. The combobox contains "Select all", "Select all fruits", "apple", "banana", "monkey"
If I check "banana" and "monkey", it displays "2 items checked".
If I check "select all fruits", "apple" and "banana" will be checked but since "select all fruits" is also an item, it will display "3 items checked"
I haven't been able to find a way to have the combobox ignore one of the listitems or to change the count of selected items. Is this possible?
Posted 10 Apr 2018 Link to this post
<
telerik:RadComboBox
ID
=
"RadComboBox1"
runat
"server"
EmptyMessage
"Select options"
CheckBoxes
"true"
EnableCheckAllItemsCheckBox
Width
"200px"
OnClientItemChecked
"itemChecked"
>
Items
telerik:RadComboBoxItem
Text
"Select all fruits"
Value
"Fruits"
BackColor
"SkyBlue"
/>
"Apple"
"Banana"
"Lemon"
"Peach"
"Select all vegetables"
"Vegetables"
"Onion"
"Potato"
"Select all animals"
"Animals"
"Monkey"
"Cat"
"Dog"
"Bird"
</
function
itemChecked(sender, args) {
if
(sender.get_text().indexOf(
"items checked"
) > 0) {
sender.set_text(
"Multiple items checked"
);
}