Clear items in RadComboBox

4 posts, 1 answers
  1. Xavi
    Xavi avatar
    3 posts
    Member since:
    Jun 2012

    Posted 21 Nov 2012 Link to this post

    Hello,

    i'm using Telerik aspnet controls for first-time so probably i'm missing something.
    I have a RadComboBox with a DataSource linked by code.

    I need to clear its items also in code-behind.

    I have tried the following

    cboExample.DataSource = null;
    cboExample.DataBind();

    But items remain in combobox.

    Which is the way to clear items in RadComboBox?

    Do i have to do cboExample.Items.Clear(); explicitly?

    Thanks
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 21 Nov 2012 Link to this post

    Hi Xavi,

    You can clear the items in the RadComboBox by using Clear server side method.

    C#:
    RadComboBox1.Items.Clear();

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Malkiat
    Malkiat avatar
    6 posts
    Member since:
    Jul 2013

    Posted 15 Jul 2013 Link to this post

    Its Working
  5. Malkiat
    Malkiat avatar
    6 posts
    Member since:
    Jul 2013

    Posted 15 Jul 2013 Link to this post

    Thanks
    Its Working
Back to Top