populate datagridviewcomboboxcolumn

PRAISE PHS

Well-known member
Joined
Jun 2, 2011
Messages
58
Programming Experience
Beginner
Hi All,
Pls, kindly help me out with this project:

I have three SQLSERVER DB tables named products, part no and serial no and each having there various primary keys. The primary key(ItemID) of products table is a foreign key on both serial no and part no tables. Also, a product has more than one serial nos and part nos depending on the quantities of the product. Now I'm trying to display all my available products in stock on datagridview. The columns on the grid view are item name, serial no, part no and quantity in stock. The serial no and part no columns are combo boxes.
Now my question is: How do I populate the serial no and part no columns which are combo boxes with the different serial nos and part nos on my DB for a particular item name.
Thanks and a prompt reply will be appreciated.
 
Thanks Ian and Jim for your responses. But, Jim please what am I to do twice. Also can you give me an idea of the select statement to use such that the item name on the first row would have all it serian nos and part nos loaded in their corresponding datagridviewcomboboxes. Pls kindly help me out with this.
 
Jim please what am I to do twice.

Seriously? My example shows how to put ONE combo box column in a DataGridView. You want TWO combo box columns. Do I really need to say more than that?

Your query will be just like any other query. You'll need to get the PK column and the column that you want to display.
 
Back
Top