DropDownLists RRS feed

  • Question

  • I have created a DropDownList inside of a GridView to display 20 values from a SQL server database.   I wanted just one DropDown but got 20 with 20 values.    I did it through the wizard.   What did I do wrong?
    • Moved by Cindy Meister MVP Monday, January 10, 2011 4:55 PM not VSTO-related (From:Visual Studio Tools for Office)
    • Moved by Jie Bao Monday, January 17, 2011 4:44 PM related (From:Windows Forms Data Controls and Databinding)
    Monday, January 10, 2011 4:41 PM

All replies

  • What steps did you perform in wizard? You need to set datasource for DropDownList.

    I think your question is related to ASP.NET GridView. If yes then it would be better to post your question on ASP.NET Forum where web experts can provide you better solution.

    Gaurav Khanna
    Monday, January 10, 2011 6:00 PM
  • Hi kpstumo,

    Could you please share some code of this application? Do you read the data from the Database and generate them in a DataTable (or other collections), then set a DataBinding between the DropDownList with the Data. Do not forget to call the DataBound() method.

    Whatever, I think this is an ASP.Net related question same with Khanna, so you could start a thread on the ASP.Net forum:, it is probably your best resource on this.


    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, January 12, 2011 5:21 PM