zoukankan      html  css  js  c++  java
  • 取得GridPanel选定行所有字段值

    1、前台

    <SelectionModel>

                                                               <ext:RowSelectionModel ID="RowSelectionModel2" runat="server">

                                                                  <AjaxEvents>

                                                                    <RowSelect OnEvent="RowSelectzhy" Buffer="250">

                                                                        <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{Details}" />

                                                                         <ExtraParams>

                                                                            <ext:Parameter Name="Values" Value="Ext.encode(#{GrdDoc}.getRowsValues())" Mode="Raw" />

                                                                        </ExtraParams>

                                                                    </RowSelect>

                                                                  </AjaxEvents>

                                                            </ext:RowSelectionModel>

                                                            </SelectionModel> 

    2、后台

     protected void RowSelectzhy(object sender, AjaxEventArgs e)

        {

            string Key;

            string json = e.ExtraParams["Values"];

            Dictionary<string, string>[] companies = JSON.Deserialize<Dictionary<string, string>[]>(json);

            if (companies.Length > 0)

            {

                foreach (Dictionary<string, string> row in companies)

                {

                    foreach (KeyValuePair<string, string> keyValuePair in row)

                    {

                        Key = keyValuePair.Key;

                        if (Key == "qzid")

                        {

                            qzid = keyValuePair.Value;

                            continue;

                        }

                        else if (Key == "zhyid")

                        {

                            zhyid = keyValuePair.Value;

                            continue;

                        }

                    }

                }

            }

        }

  • 相关阅读:
    [luogu4799 CEOI2015 Day2] 世界冰球锦标赛(折半搜索)
    [luogu3230 HNOI2013] 比赛 (搜索+Hash)
    [luogu2317 HNOI2005] 星际贸易 (dp)
    [luogu2414 NOI2011]阿狸的打字机 (AC自动机)
    [bzoj3507 Cqoi2014]通配符匹配 (hash+DP)
    [luogu2054 AHOI2005] 洗牌 (数论)
    bzoj1491 [NOI2007]社交网络
    bzoj1022 [SHOI2008]小约翰的游戏John
    bzoj1088 [SCOI2005]扫雷Mine
    bzoj1295 [SCOI2009]最长距离
  • 原文地址:https://www.cnblogs.com/easypass/p/1654703.html
Copyright © 2011-2022 走看看