VS 2015 Combobox detntro of a datagridview in vb.net 2015-VBForums
Results 1 to 3 of 3

Thread: Combobox detntro of a datagridview in vb.net 2015

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2017
    Posts
    10

    Combobox detntro of a datagridview in vb.net 2015

    Thanks in advance

    I have a query that generates 2 columns as a result. The first one is of type String and the other integer, I can load the two columns in the datagridview but what I want is for the second column to load in a comboBox. I have no idea how to do it, thanks in advance

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    3,456

    Re: Combobox detntro of a datagridview in vb.net 2015

    Are you loading a DataTable with your query? If so, then set the combobox datasource to the DataTable and set the displaymember to the DataTable field name. For more information Google "visual basic fill combobox with datatable"

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    97,350

    Re: Combobox detntro of a datagridview in vb.net 2015

    Do you mean you want a column of ComboBox controls in the grid? If so then follow the CodeBank link in my signature below and check out my thread on Adding A ComboBox Column To A DataGridView or similar.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.