码迷,mamicode.com
首页 > Web开发 > 详细

ASPxDashboardViewer_OnDashboardLoaded 修改Item参数

时间:2016-09-08 23:25:40      阅读:410      评论:0      收藏:1      [点我收藏+]

标签:

 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参数

标签:

原文地址:http://www.cnblogs.com/googlegis/p/5854695.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!