This is probably old question but can't find an answer...
I have a DataGridView and display a query results in it
Table1: Field1, Field2, ID
Table2: ID, LName, FName
DataSet ds get values from "SELECT Field1, Field2, LName & ' ' & FName As Name FROM Table1, Table2 WHERE Table1.ID = Table2.ID"
dGrid.DataSource = ds.Tables
Then I'd like to make 3rd column a combobox with an option to select values from Table2
DataGridViewComboBoxColumn cbc = new DataGridViewComboBoxColumn();
DataSet ds1 get from "SELECT ID, LName & ' ' & FName As Name FROM Table2"
cbc.DataPropertyName = "Name";
cbc.DataSource = ds1.Tables;
cbc.ValueMember = "Name";
cbc.DisplayMember = "Name";
Gives me Argument Exception error. Not sure why.
Does anybody have a working example?