有人可以告诉我单击按钮时如何获取选中行的列表(嵌套网格中的复选框值(ID =“nestedGridView”)和每个选定行的 docnumber 值)?
<asp:GridView ID="gvMaster" runat="server" AllowPaging="True"
AutoGenerateColumns="False" DataKeyNames="Accountkey"
DataSourceID="SqlDataSource1" OnRowDataBound="gvMaster_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<a href="javascript:cx('customerID-<%# Eval("Accountkey") %>');">
<img id="imagecustomerID-<%# Eval("Accountkey") %>"
alt="Click to show/hide orders" border="0" src="Border.png" />
</a>
<asp:CheckBox ID="chkselect" Checked="false" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Accountkey" />
<asp:BoundField DataField="fullname" />
<asp:TemplateField>
<ItemTemplate>
<tr><td colspan="100%">
<div id="customerID-<%# Eval("Accountkey") %>" style="...">
<asp:GridView ID="nestedGridView" runat="server"
AutoGenerateColumns="False" DataKeyNames="Id">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chkselect" Checked="false"
runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Id" HeaderText="Id"/>
<asp:BoundField DataField="Valuedate" HeaderText="Valuedate"/>
<asp:BoundField DataField="Docnumber" HeaderText="Docnumber"/>
</Columns>
</asp:GridView>
</div>
</td></tr>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>