Radcombo passes databind but display does not show any items added

2 posts, 0 answers
  1. Deepak Vasudevan
    Deepak Vasudevan avatar
    82 posts
    Member since:
    May 2010

    Posted 17 Nov 2011 Link to this post

    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. 
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Nov 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top