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

AspxGridView 客户端点击获取对应的列值

时间:2016-09-09 10:01:42      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:

Html 内容:

<dx:ASPxGridView ID="ASPxGridViewCluster" runat="server" Width="100%" ClientInstanceName="gridViewCluster" KeyFieldName="簇ID" OnCustomCallback="ASPxGridViewCluster_OnCustomCallback" OnPageIndexChanged="ASPxGridViewCluster_OnPageIndexChanged"  OnBeforeColumnSortingGrouping="ASPxGridViewCluster_OnBeforeColumnSortingGrouping">
                                <Settings HorizontalScrollBarMode="Auto" VerticalScrollBarMode="Auto" VerticalScrollableHeight="200" ShowGroupPanel="False" ShowHeaderFilterButton="False"/>
                                <SettingsPager AlwaysShowPager="true" PageSize="10"></SettingsPager>
                                <SettingsBehavior AllowSelectByRowClick="True" AllowSelectSingleRowOnly="True" AllowSort="False"></SettingsBehavior>
                                <ClientSideEvents RowDblClick="OnClusterGridDoubleClicked"/>
                                <SettingsSearchPanel Visible="False"/>
                            </dx:ASPxGridView>

 

JavaScript 内容

//获取grid选择的当前行的经纬度
    function OnClusterGridDoubleClicked(s, e) {

        s.GetSelectedFieldValues("簇ID", GetClusterSelectedFieldValuesCallback);

    }

    //缩放地图到选择行的经纬度
    function GetClusterSelectedFieldValuesCallback(values) {

        if (values.length === 0) {
            console.log("取得的值为空.");
            return;
        }

        var lll = values[0];

        var id = lll[0];

        setCookies("index_overview_grid_flag", ‘cluster‘);


        var title = "小区维度指标--簇ID:" + id;

        popCellPlan(title);
    }

 

AspxGridView 客户端点击获取对应的列值

标签:

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

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