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


    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);
        }
  • 相关阅读:
    String和enum的互相转换
    LeetCode: Sort Colors
    LeetCode: Subsets II
    LeetCode: Spiral Matrix II
    LeetCode: Subsets
    LeetCode: Sum Root to Leaf Numbers
    LeetCode: Sqrt(x)
    LeetCode: Sudoku Solver
    LeetCode: Spiral Matrix
    LeetCode: Substring with Concatenation of All Words
  • 原文地址:https://www.cnblogs.com/googlegis/p/5855221.html
Copyright © 2020-2023  润新知