I am trying to remove an item from my dropList with Jquery. It seems that the conventional approach does not work...
$("#Type option[value='02']").remove();
Is there any way to remove an item from your dropList control?
Thank you
3 Answers, 1 is accepted
0
Accepted
Georgi Krustev
Telerik team
answered on 11 Oct 2011, 12:21 PM
Hello Priester,
The ComboBox UI component renders LI element for the items instead of OPTION, because the SELECT element. In order to achieve your goal you will need to remove the item from the data array and rebind the combo:
varcombobox = $("#ComboBox").data("tComboBox");
combobox.data = combobox.data.slice(1);
combobox.reload();
Regards,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now