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

Radcombo passes databind but display does not show any items added

1 Answer 35 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Deepak Vasudevan
Top achievements
Rank 2
Deepak Vasudevan asked on 17 Nov 2011, 06:26 PM
I could see the following code execute in debugger without any demur but when the page is rendered the radcombo dropdown is blank.

            radXAxisData.DataSource = htServiceMetrics
            radYAxisData.DataSource = htServiceMetrics
            radXAxisData.DataTextField = "Value"
            radXAxisData.DataValueField = "Key"
            radXAxisData.DataBind()
            radYAxisData.DataBind()

where htServiceMetrics is the hashtable which has eight items in it. 

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Nov 2011, 05:46 AM
Hello,

In which event you tried the binding. I have tried the same in PageLoad and it worked as expected. Here is the sample code.

C#:
protected void Page_Load(object sender, EventArgs e)
   {
      Hashtable mycountries = new Hashtable();
      mycountries.Add("N","Norway");
      mycountries.Add("S","Sweden");
      mycountries.Add("F","France");
      mycountries.Add("I","Italy");
      RadComboBoxht.DataSource = mycountries;
      RadComboBoxht.DataTextField = "Value";
      RadComboBoxht.DataValueField = "Key";
      RadComboBoxht.DataBind();
    }

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