I added a Dynamic Data web app as a second project to an MVC 3 app. The Dynamic Data app references the derived EF 4.1 Context in the MVC 3 app (code first).
DefaultModel.RegisterContext(
new EFCodeFirstDataModelProvider(() => new MvcApplication1.Models.Context()),
new ContextConfiguration() { ScaffoldAllTables = true });
I want to try out a Dynamic GridView control but I don't understand how to configure the DataSource control. The connection string from my MVC app didn't work for the control. Nothing shows up in the control's configuration wizard even after a build. I am totally webforms/datasource illiterate. Am I way off here? How do I do this?
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="WebApplication1.DynamicData.CustomPages.WebUserControl1" %>
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
<asp:DynamicDataManager ID="DynamicDataManager1" runat="server" />
<DataControlReference ControlID="GridView1"/>
</asp:DynamicDataManager>
<asp:EntityDataSource ID="EntityDataSource1" runat="server">
</asp:EntityDataSource>
DD templates are way behind.
Add this to a file:
Then Global can contain this:
And then you can do things like this in a page to use dynamic outside of the route:
Along side of grid and source like this: