Hello,
At the moment I am using this LINQ query in C# to check all items but I am wanting to do the same in javascript.
void cblMagistrateCourts_Load(object sender, EventArgs e){ RadComboBox c = (RadComboBox)sender; IEnumerable<RadComboBoxItem> uncheckedItems = from uncheckedItem in c.Items.ToList() where uncheckedItem.Checked == false select uncheckedItem; foreach (RadComboBoxItem i in uncheckedItems) { i.Checked = true; }}
I tried the following 3 thigns in javascript and in IE F12 tools I tried to find & 'check' the 'Check All' to but that did not seemed to be checking all items (Not sure)
not sure the 2nd attempt was in the right direction. I am getting the correct id of radCombobox using sender.get_id();
function radCblCheckAll(sender, eventArgs) { //var combo = sender.get_id(); //var chkAll = combo + '_Header_SelectAll'; //alert(chkAll.toString()); //chkAll.checked = true; //alert($telerik.$('.rcbCheckAllItemsCheckBox').checked); //$telerik.$('.rcbCheckAllItemsCheckBox').change(function () { // if (sender.get_text() == "All items checked") { // sender.checked = true; // } //}); var combo = sender.get_id(); var item = combo.findItemByText('Check All'); item.select();}