我有一个gridview,我想在弹出窗口中显示一些数据(弹出窗口不应该是ajax控件)。我试图通过在gridview中放置一个gridview来做到这一点,例如:
<asp:GridView ID="grdInspectionApprovel" runat="server" Width="99%" EmptyDataText="<%$ Resources:Captions,grdEmptyPeriods%>"
AutoGenerateColumns="False" ShowFooter="true" Style="margin-bottom: 1px" CssClass="grdviewbrd"
OnRowDataBound="grdInspectionApprovel_RowDataBound" OnRowCommand="grdInspectionApprovel_RowCommand"
OnRowCreated="grdInspectionApprovel_RowCreated" OnRowEditing="grdInspectionApprovel_RowEditing">
<RowStyle CssClass="RowStyle" />
<EmptyDataRowStyle CssClass="emptyRow1" />
<PagerSettings Visible="false" />
<AlternatingRowStyle CssClass="AtlernatingRowStyle" />
<Columns>
<asp:TemplateField HeaderText="POPUP" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<div id="simplediv" style="background-color: White; border: 1px solid black; display: none;
width: 70%; height: 200px;">
<table width="100%">
<tr>
<td align="right">
<input type="image" src="~/App_Themes/MyWebTheme/images/imgError.gif" id="imageButton"
onclick="Popup.hide('simplediv');return false;" />
</td>
</tr>
<tr>
<td>
<asp:GridView ID="grdInspectionApprovelPOPUP" runat="server" Width="98%" EmptyDataText="<%$ Resources:Captions,grdEmptyPeriods%>"
AutoGenerateColumns="False" ShowFooter="true" Style="margin-bottom: 1px" CssClass="grdviewbrd">
<RowStyle CssClass="RowStyle" />
<EmptyDataRowStyle CssClass="emptyRow1" />
<PagerSettings Visible="false" />
<AlternatingRowStyle CssClass="AtlernatingRowStyle" />
<Columns>
<asp:TemplateField HeaderText="<%$ Resources:Captions,lblSupplierSINo%>" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:TextBox ID="txtSupplierSINo" runat="server" Text='<%# Eval("SupplierSerialNo") %>'
Width="150px"></asp:TextBox>
<headerstyle cssclass="gridtophead" />
<itemstyle horizontalalign="Center"></itemstyle>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="grid_title" />
</asp:GridView>
</td>
</tr>
<tr>
<td>
<asp:ImageButton runat="server" ID="deletebtn1" CommandName="btnSave" ImageUrl="<%$ Resources:Paths,imgBtnSave%>" />
<asp:LinkButton runat="server" ID="deletebtn" CommandName="btnSave" Text="Save"></asp:LinkButton>
<asp:Button ID="Button1" runat="server" Text="<%$ Resources:Captions,btnReset%>"
CssClass="btnStyle" />
</td>
</tr>
</table>
</div>
<a href="#" onclick="Popup.show('simplediv');return false;">+</a>
<asp:LinkButton runat="server" ID="linkbtnPopup" CommandName="callPopup" Text="++"
CommandArgument='<%# Eval("WOID") %>'></asp:LinkButton>
</ItemTemplate>
<FooterStyle HorizontalAlign="Center"></FooterStyle>
<HeaderStyle CssClass="gridtophead" />
<ItemStyle HorizontalAlign="Right" Width="2%"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="<%$ Resources:Captions,lblSrNo%>" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblWO" Text='<%# Eval("WOID") %>' runat="server" Style="display: none;"></asp:Label>
<asp:Label ID="lblAssetID" Text='<%# Eval("AssetID") %>' runat="server" Style="display: none;"></asp:Label>
<%#(Convert.ToInt32(hfPageIndex.Value) * grdInspectionApprovel.PageSize) + Container.DataItemIndex + 1%>
</ItemTemplate>
<FooterStyle HorizontalAlign="Center"></FooterStyle>
<HeaderStyle CssClass="gridtophead" />
<ItemStyle HorizontalAlign="Right" Width="2%"></ItemStyle>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="grid_title" />
</asp:GridView>
Popup.show('simplediv')
这个函数来自javascript文件。我想在父gridview的每个rowCommand上绑定chield gridview,并希望在弹出div上显示这个gridview。