views:

460

answers:

2

For simplicity I am going to use Northwind as an example... I would like to have a databound DataView that displays "Order" information data from two different entities "Products" and "Order Details"

I want to build a web form where when the user clicks on the screen to view a "Order" It would display a single databound Dataview that contains the "Products.ProductName" and the "Order Details.Discount" for that product for the selected customer. The Discount will be editable/updateable where the Product Name will not. I know I will need template fields but what I cannot get to work is having both entitiies in the same dataview.

I have tried several ways of databinding but none have worked.

I will have an ADO .Net Entity Data Model that I will use that contains these (and other) tables.

I have searched the web for an example but I must not be using the correct key words, I can't believe I am the first one looking for this functionality.

I am hoping for a pointer to an article or example that is similar to my situation.

Thanks in advance, -J

A: 

You could try using Asp.Net Dynamic Data. This will generate much of the functionality that you are trying to create. For details, see:

http://msdn.microsoft.com/en-us/library/cc488545.aspx

Hope this helps

Shiraz

Shiraz Bhaiji
A: 

I was able to successfully bind to several tables to my gridview. Because of the limitation in Entity framework I could only update the fields to the main bonded entity, all other properties are "Eval"'ed and read only.

Jay