Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Regarding the webdropdown... List item Show empty Fields

Hi all,

I trying to Use a Webdropdown.  when i am Trying to Bind the Control with the Datatable setting its TextField and Value Field , it is showing the Values For the First Time and From the Next time it is Showing empty Text and Value though I am able to List items it is showing Empty Text.


it would be Great if you can Even Help me with this. My work would be almost Done.




  protected void WebDropDown1_ValueChanged(object sender, Infragistics.Web.UI.ListControls.DropDownValueChangedEventArgs e)



            DataTable dt = new DataTable();

            dt.Columns.Add("name", typeof(string));
            dt.Columns.Add("id", typeof(int));

            DataRow dr = dt.NewRow();
            dr["name"] = Convert.ToString("test" + DateTime.Now.ToString());
            dr["id"] = Convert.ToInt32(1);


            dr = dt.NewRow();
            dr["name"] = Convert.ToString("test12" + DateTime.Now.ToString());
            dr["id"] = Convert.ToInt32(1);


            WebDropDown2.DataSource = dt;
            WebDropDown2.TextField = "name";
            WebDropDown2.ValueField = "id";





For the First time It is showing the Value but for the next it is Showing. Please do the needful


Thanks & regards