Erase Items of RadComboBox on demand

2 posts, 1 answers
    TANSERI avatar
    16 posts
    Member since:
    Apr 2009

    Posted 08 Feb 2011 Link to this post

    Hi, I have 2 combox box on Load on demand. 
    The first one is in Autopostback mode cause when an item is selected, the second combo box is loaded on demand thanks to the selected value of the first combobx. It works perfectlly.

    Nevertheless, when an another item is selected in the first combobox, I want to "erase" the selected item of the second combobox.

    I tried to use item.selected.remove(), but the selected item persists in search field. Is there a trouble with the removing option when a combobox is loaded on demand? I also tried to count the number of the second combo box but it returns 0.

    Thanks a lot for helping.
  2. Answer
    Kalina avatar
    918 posts

    Posted 10 Feb 2011 Link to this post

    Hello TANSERI,

    You can try to set the text of the second RadComboBox to an empty string.
    Please take a look at this online demo. At the OnClientSelectedIndexChanging event of the RadComboBox1 the text of the RadComboBox2 is set to empty string and items are cleared if there is no item selected at the RadComboBox1.

    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top