Last post Dec 09, 2008 07:00 PM by ricka6
Dec 08, 2008 11:56 PM|mdesoysa|LINK
I needed to get infomation from a couple of tables so I created a view and added that to my dbml file.
All the pages have been routed to run using the ListDetails template (with a gridview and detailsview) but when I go to the page using the view it shows only the gridvew and no detailsview.
Does anybody know why this is happening?
Appreciate any help.
Dec 09, 2008 09:09 AM|SGWellens|LINK
Maybe there is no data to display. Try adding the EmptyDataText property:
<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px"
EmptyDataText="No Data in DetailsView!">
Dec 09, 2008 11:58 AM|sjnaughton|LINK
I think all you need to do is add an PK identifier to the view in your model see this thread here:
Re: Dynamic Data with views
Dec 09, 2008 01:22 PM|ricka6|LINK
How to create an updateable view with ADO Entity Framework and with LINQ to SQL
Dec 09, 2008 06:35 PM|mdesoysa|LINK
I set all of the columns to PK= true (even though none of them actually are) and I set the autosync on all of the columns to 'OnInsert' .The detailsview shows and existing records are editable however new records can't be created.
It says that the changes multiple base tables (I have taken columns from 5 different tables for the view that I'm using).
Dec 09, 2008 07:00 PM|ricka6|LINK
You can't make a non-updateable view updateable on Dynamic Data. Updateable views is a fairly complex topic unrelated to Dynamic Data. You need to experment with your view in T-SQL and verify if they are updateable. Once you get an updateable view working
on the server (in EM or SQL Management Studio for example) then you can move to to Dynamic Data. Even then you might have to drop down to the console mode level to sort out the problem.