This is a migrated thread and some comments may be shown as answers.

Clear items in RadComboBox

3 Answers 1426 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Xavi
Top achievements
Rank 1
Xavi asked on 21 Nov 2012, 03:13 PM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 22 Nov 2012, 03:47 AM
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.
0
Malkiat
Top achievements
Rank 1
answered on 15 Jul 2013, 07:30 AM
Its Working
0
Malkiat
Top achievements
Rank 1
answered on 15 Jul 2013, 07:31 AM
Thanks
Its Working
Tags
ComboBox
Asked by
Xavi
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Malkiat
Top achievements
Rank 1
Share this question
or