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;
}
}
}
}
}