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

[Solved] Adding RadCombobox

1 Answer 207 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jols
Top achievements
Rank 2
Jols asked on 12 May 2009, 06:55 AM
Good Day!
 
                 ask for help on adding radcombobox programmatically correct if my term is not on the right term,, here's the scenario i have on combobox on my page and one add button..when user click the add button another combobox will be added to the page and soon..how can do that..

sample codes is highly appreciated

thanks to all

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 May 2009, 07:32 AM
Hello Jols,

Try the following code snippet for dynamically adding RadCombobox in page.

CS:
 
protected void Button1_Click(object sender, EventArgs e)  
{  
    RadComboBox combo1 = new RadComboBox();  
    combo1.ID = "RadCombo";  
    RadComboBoxItem item1 = new RadComboBoxItem("Text""Value"); //Creates new item for RadCombobox  
    combo1.Items.Add(item1);  
    this.form1.Controls.Add(combo1);   

You can also refer the following link which shows how you can programmatically add, remove, disable, or select items in RadComboBox, using server side API
Working with Items in Server Side Code

Thanks,
Princy.
Tags
ComboBox
Asked by
Jols
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or