Can not update DropDownList

2 posts, 0 answers
  1. Sebastian
    Sebastian avatar
    4 posts
    Member since:
    Mar 2014

    Posted 17 Jun 2014 Link to this post

    Hello,
    I have problem with population DropDownList few times... First time is working, than I get first element choosed but rest of the list is empty:

                    MainProgram.myConnectionHelper.Connection.Open();
                    SqlCommand myCommand = new SqlCommand("SELECT Twr_Kod, Twr_Nazwa FROM Seven.TwrKarty WHERE Twr_Kod = 'W01 'or Twr_Kod = 'W06';", MainProgram.myConnectionHelper.Connection);
                    //ddlRodzajMiesa.BeginUpdate(); 
                    //ddlRodzajMiesa.DropDownStyle = RadDropDownStyle.DropDown;
                    ddlRodzajMiesa.DataSource = null;
                    ddlRodzajMiesa.ValueMember = "Twr_Kod";
                    ddlRodzajMiesa.DisplayMember = "Twr_Nazwa";
                    ddlRodzajMiesa.DataSource = myCommand.ExecuteReader();
                    ddlRodzajMiesa.SelectedValue = 0;
                    //ddlRodzajMiesa.DropDownStyle = RadDropDownStyle.DropDownList;
                    //ddlRodzajMiesa.EndUpdate();
                    MainProgram.myConnectionHelper.Connection.Close();



    Thanks for any help in advance...







  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 20 Jun 2014 Link to this post

    Hi Sebastian,

    Thank you for writing.

    I was not able to reproduce the observed behavior. This is why I attached my test project. Could you please check it and let me know how it differs from your real setup? 

    I am converting this Forum thread into a support ticket in order to allow attachments.You can find it in your Telerik account.

    I am looking forward to your reply.

    Regards,
    Dimitar
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top