3
我已經爲現有的動態數據應用程序添加了一個新的系統(DB)。我在global.asax中註冊了路線。我已經將腳手架的表格變爲真實。動態數據模型「可見表」數總是爲零
但是在將DataSource提供給gridview的表導航中,Visibletables數始終爲零。 eventhough表計數是4。
區域測試配置
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();
請協助
你可以粘貼你的全部Global.asax.cs請 – Wizzard