Create the radcombobox with muti-selection[CheckBoxList].
< telerik:RadComboBox ID="rcbCompetency" runat="server" Skin="Office2007"
DropDownWidth=”250″ Width=”250px”
OnClientDropDownClosed=”HandleClose”>
runat=”server” BorderStyle=”None”>
Javascript :
function stopPropagation(e) {
e.cancelBubble = true;
if (e.stopPropagation) {
e.stopPropagation();
}
}
Display the selected items to the comboBox:
function HandleClose(comboBox) {
var selectedData = “”;
var items = comboBox.get_items();
for (var i = 0; i < items.get_count(); i++) {
var itemDiv = items.getItem(i).get_element();
var inputs = itemDiv.getElementsByTagName(“input”);
var inputsData = itemDiv.getElementsByTagName(“label”);
for (var inputIndex = 0; inputIndex < inputs.length; inputIndex++) {
var input = inputs[inputIndex];
if (input.type == “checkbox”) {
if (input.checked == true)
selectedData = selectedData + inputsData[inputIndex].innerText+”,”;
}
}
}
comboBox.set_text(selectedData.substring(0, selectedData.length – 1));
}
It’s really good one, thx