I have binded some data to radcombobox during pageload. This is rendered as multicolumned radcomboxbox. I need to add some more data dynamically after user inputs the value.
Please let me know how to achieve ths.
The below is what I have implemented but the data is not getting inserted in the dropdow
public
class ItemTemplate : ITemplate
{
public void InstantiateIn(Control container)
{
Literal lit = new Literal();
lit.Text =
"<div class='cmb_rdFnt cmb_ltFlt'>" + "ABC" + "</div> <div class='cmb_rdFnt cmb_ltFlt cmb_sp20'>"+"DEF"+"</div>"+"<div class='cmb_rdFnt cmb_ltFlt cmb_sp20'>"+"GHI"+"</div>";
container.Controls.Clear();
container.Controls.Add(lit);
}
// Page_load evenet
if
(!Page.IsPostBack)
{
PaymentSelectionData pmtSelData;
for (int i = 0; i < 5; i++)
{
pmtSelData =
new PaymentSelectionData();
pmtSelData.paymentTypeDesc =
"desc1" + i.ToString();
lstPmtSel.Add(pmtSelData);
}
RadComboBox1.DataValueField =
"refVal";
RadComboBox1.DataTextField =
"paymentTypeDesc";
RadComboBox1.DataSource = lstPmtSel;
RadComboBox1.DataBind();
}
else
{
RadComboBoxItem item = new RadComboBoxItem();
item.Attributes.Add(
"info", "Hello");
RadComboBox1.Items.Add(item);
ItemTemplate i1 = new ItemTemplate();
i1.InstantiateIn(item);
RadComboBox1.DataBind();
}