ASPxDashboardViewer_OnDashboardLoaded 修改Item参数
Posted 豆棚瓜架
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ASPxDashboardViewer_OnDashboardLoaded 修改Item参数相关的知识,希望对你有一定的参考价值。
protected void ASPxDashboardViewer_OnDashboardLoaded(object sender, DashboardLoadedWebEventArgs e) { var id = e.DashboardId; string regiongEn = CookieHelper.GetCookieValue("regionCityName_EN"); if (id.Contains("163")) { Dashboard dashboard = e.Dashboard; ChoroplethMapDashboardItem mapDashboardItem = (ChoroplethMapDashboardItem)dashboard.Items["mapDashboardItem1"]; //DashboardParameter dashboardParameter = dashboard.Parameters["P_REGION"]; //StaticListLookUpSettings parameterLookUpSettings = new StaticListLookUpSettings(); //parameterLookUpSettings.Values.SetValue(); //Console.WriteLine(dashboardParameter.LookUpSettings); //dashboardParameter.LookUpSettings } if (id.Contains("Map")) { Dashboard dashboard = e.Dashboard; ChoroplethMapDashboardItem mapDashboardItem = (ChoroplethMapDashboardItem)dashboard.Items["choroplethMapDashboardItem1"]; string shpPath = Server.MapPath("App_Data/DashBoard/" + regiongEn + "/Map/全境_区县界面_region.shp"); Console.WriteLine(mapDashboardItem.CustomShapefile.Url); mapDashboardItem.CustomShapefile.Url = shpPath; Console.WriteLine(mapDashboardItem.CustomShapefile.Url); } }
以上是关于ASPxDashboardViewer_OnDashboardLoaded 修改Item参数的主要内容,如果未能解决你的问题,请参考以下文章