Howdy -
I kinda understand the problem - you want to change the data populated in a specific drop down cell of a datagridview?
It's actually fairly simple, if you use a bit of OO principles... Here's what you need to do: For every new row that is added (or wherever you want the supplier list to be populated), declare a new DataGridViewComboBoxCell, which you then populate with your list of suppliers as you would anormal combobox (using the .Items.Add() method). Then, once loaded, set the cell of the row you are working with equal to the new DataGridViewComboBoxCell...
-
myDataViewGrid.Rows[myDataViewGrid.Rows.Count - 1].Cells["colSuppliers"] = myNewDataGridViewComboBoxCell
-
I don't know if you can easily cast objects in VB, but in C# the really easy way is to cast the existing cell while using it, as follows:
-
((DataGridViewComboBoxCell)myDGV.Rows[myDGV.Rows.Count - 1].Cells["colSuppliers"]).Items.Clear;
-
((DataGridViewComboBoxCell)myDGV.Rows[myDGV.Rows.Count - 1].Cells["colSuppliers"]).Items.Add("Supplier A");
-
((DataGridViewComboBoxCell)myDGV.Rows[myDGV.Rows.Count - 1].Cells["colSuppliers"]).Items.Add("Supplier B");
-
Hope it answers your question