Hi, I have 2 tables:
Payment (PaymentId, Date, Description, Amount, PaymentMethodId)
PaymentMethod (PaymentMethodId, Description)
The first table contains details of any Payments that we receive and is displayed in the datagridview.
The second is a lookup table which lists the methods of payment (ie. cash, cheque, credit card) and should appear as a combobox in the grid.
As you can see there is a foreign key (PaymentMethodId) between the two tables.
I'm binding the DataGridViewComboBoxColumn as follows:
comboboxColumn.DataSource = myDataset.PaymentMethod;
comboboxColumn.ValueMember = "PaymentMethodId";
comboboxColumn.DisplayMember = "Description";
Then adding it to the grid. But when the grid displays I receive the following data error "DataGridViewComboBoxCell value is not valid" and the cell value contains the Id (such as 1) rather than the Description (such as "Cash").
Any ideas what I'm doing wrong?
I have the same Problem But The Tables Are Different
Please Have time to view the part sample code
Also I provided The Error As An img
Thanks in advance