here's my scenario:
Say I have 2 tables:
TERM (payment terms of an order, 2 fields: TermID, TermDescription)
ORDER (the order itself, lots of fields: OrderID, PO, etc...)
let's say I'm trying to show the term description on and the order itself on one grid. I accomplished this by:
Creating a bindingsource to the order table,
bind it to the datagridview,
In the datagridview column that is called TermID,
modified this to a combobox,
use the TERM table as datasource,
TermID as value, and TermDescription as description.
No messy queries. You can do this with as many tables as you need to so long as the table structure makes sense.
Other uses:
to display tables like UserInGroup with 2 fields, but you want to show more data from both the User table and the Group Table to display something like:
Group, GroupCreatedBy, UserId, UserFullName
Say I have 2 tables:
TERM (payment terms of an order, 2 fields: TermID, TermDescription)
ORDER (the order itself, lots of fields: OrderID, PO, etc...)
let's say I'm trying to show the term description on and the order itself on one grid. I accomplished this by:
Creating a bindingsource to the order table,
bind it to the datagridview,
In the datagridview column that is called TermID,
modified this to a combobox,
use the TERM table as datasource,
TermID as value, and TermDescription as description.
No messy queries. You can do this with as many tables as you need to so long as the table structure makes sense.
Other uses:
to display tables like UserInGroup with 2 fields, but you want to show more data from both the User table and the Group Table to display something like:
Group, GroupCreatedBy, UserId, UserFullName