With any databound control, you can only have one datasource. In your case, where you want data from two sources, you need to combine them in some fashion. You could create a view on the database, for instance, and include all the fields from both tables. Or you could create a recordset which includes all the fields and bind your control to that. In either case, you need to design the SQL correctly to make it updatable. (I’m assuming whatever database you’re using allows this.)
Another alternative would be to have the ProductName field in a header field, outside the grid. But, I think your best option would be to A) use an updatable view and B) let the user pick the ProductName from a dropdown list, instead of forcing them to enter an ID.
Discuss This Question: