I have a database containing two tables, Products and Licences. Licences.ProductID
has a foreign key reference to Products.ProductID
(i.e. licenses for that product).
How do I represent that relationship in a WinForms DataGridView?
When feeding the DtaaGridView (SQL Metal and through LINQ to SQL), the ProductLicences.ProductID, it automatically generates a column with a text field expecting a "Product" (which of course I can't enter...).
How do I change this column to contain a combobox listing the available products?
I have an connection (inherits from Linq.DataContext
), the data source assigned to the DataGridView is a Link.IQueryable
, generated as such:
var ds = from c in m_connection.Licences
select c;