By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,743 Members | 1,058 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,743 IT Pros & Developers. It's quick & easy.

Bind multiple DataTables as one object to a GridView

P: n/a
Hi!

I have got a very complex database schema. For example a customer is
constructed within a Customer table and a Person table. I have both
tables as DataTables in a DataSet.
When I want to bind this data to a GridView I get offered both
DataTable-Adapters.
Now I believe that I should build something between the DataSet and the
GridView, but I don't know how it should look like.

One guess of mine is using a BindingList that contains custom objects.
The custom objects would just reference to the DataRow's properties in
the DataTables.

Is this a proper solution?
If yes, does someone have a sample for this way, where I can see how to
implement all the CRUD functionality?
If not, what would be a fast forward way to accomplish this task?

Thanks

Joe
May 4 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
the quickest solution would be to create a view from those tables, and then
bind it to controls
May 4 '07 #2

P: n/a
mirko wrote:
the quickest solution would be to create a view from those tables, and then
bind it to controls
Do you mean a view on the MSQL-Server?
Would such a view support updates, delete and create as well?
May 4 '07 #3

P: n/a
Joe Kovac wrote:
mirko wrote:
>the quickest solution would be to create a view from those tables, and
then bind it to controls

Do you mean a view on the MSQL-Server?
Would such a view support updates, delete and create as well?
Looks like this is no real option:
View or function 'Test.dbo.View_1' is not updatable because the
modification affects multiple base tables.
Or maybe I need some more info on views that can update multiple tables?
May 4 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.