I have a ListBox and each time one item is selected a RadCombo is added to my page with the ID = Selected value in the listbox. On server side my code verifies to not duplicate the Radcombo. There is a button for each RadCombo to remove it from the page. The delete action is made on client side with Jquery code and it just empty the div containing radcombo and other controls. Unfortunately Telerik doesn’t remove the RadCombo from its collection, and I verified there is still some div hidden with the same ID, and still continue to work with the RadCombo and getting the following error shown in FireBug:
(header is the class of div containing the RadCombo)
_
evt = Object { type="click", rawEvent=, more...}
(?)()
browserHandler(e=click clientX=393, clientY=182) e = click clientX=393, clientY=182
var index = header._index;
My question is how can I remove the control on client site in order to not get the error.
I added the following code on pageLoad event
combos = Telerik.Web.UI.RadComboBox.ComboBoxes;
//First of all how do I get the Id of each combo?
$.each(combos, function(){this.??? // Get Name or ID});
The javascript is an external file and cannot use <% =control.ClientID%>
I hope that I was clear to define my issue, and would really appreciated any help.