PC Review


Reply
Thread Tools Rate Thread

Bind multiple DataTables as one object to a GridView

 
 
Joe Kovac
Guest
Posts: n/a
 
      4th May 2007
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
 
Reply With Quote
 
 
 
 
mirko
Guest
Posts: n/a
 
      4th May 2007
the quickest solution would be to create a view from those tables, and then
bind it to controls


 
Reply With Quote
 
Joe Kovac
Guest
Posts: n/a
 
      4th May 2007
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?
 
Reply With Quote
 
Joe Kovac
Guest
Posts: n/a
 
      4th May 2007
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best practice for combining typed DataTables for display in GridView J055 Microsoft ASP .NET 2 1st Nov 2007 07:09 PM
Gridview and Bind() =?Utf-8?B?ZGF2ZQ==?= Microsoft ASP .NET 0 17th Nov 2006 03:43 AM
Want to Eary Bind Instead of Late Bind Object an IE Object Dick Sutton Microsoft VB .NET 3 23rd May 2006 04:32 PM
Advantages of using custom collections over datatables to bind to a datagrid? John Dalberg Microsoft ASP .NET 4 8th Dec 2005 07:39 PM
Bind GridView to generic custom object List collection Steven Baggs Microsoft ASP .NET 5 18th Oct 2005 10:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:49 AM.