I have added a new system(DB) to the existing dynamic data application. I have registered routes in global.asax . I have given scaffoldalltables to true.
But in table navigation while giving DataSource to gridview, Visibletables count is always zero. eventhough tables count is 4.
region Test Configuration
TestModel.RegisterContext(typeof(TestModel.CompassionEntities), new ContextConfiguration { ScaffoldAllTables = true });
TestModel.FieldTemplateFactory = new AdvancedFieldTemplateFactory();
routes.Add(new DynamicDataRoute("Test.{table}/ListDetails.aspx")
{
Action = PageAction.List,
RouteHandler = new AdvancedDynamicDataRouteHandler(),
ViewName = "ListDetails",
Model = TestModel
});
routes.Add(new DynamicDataRoute("Test.{table}/ListDetails.aspx")
{
Action = PageAction.Details,
RouteHandler = new AdvancedDynamicDataRouteHandler(),
ViewName = "ListDetails",
Model = TestModel
});
endregion
tablenavigation.cs
TestGridView.DataSource = Global.TestModel.VisibleTables; TestGridView.DataBind();
Please assist