请看图片,因为它会解释我的问题 我在gridview(项目模板)中有2个用户控件。有一个红色按钮和一个绿色按钮,当按下按钮时,它会触发用户控件打开。它会像弹出对话框一样显示出来。
我遇到的问题是隐藏了一个用户控件,但另一个是在网格中打开的。我不知道为什么会这样做。我替换了整个网格并制作了新的用户控件,但我遇到了同样的问题。请帮忙
我的代码如果有帮助
<asp:GridView
runat="server"
ID="gvParent"
CssClass="Grid alt pgr myGridClass myPagerClass myPagerClass"
DataKeyNames="OrderNumber"
AutoGenerateColumns="False"
GridLines="Both"
AllowPaging="true"
PagerStyle-CssClass="pagination"
PageSize="5"
pagersettingsmode="Numeric"
Mode="Numeric"
data-filter="#filter"
data-page-size="10"
OnRowDataBound="gvParent_RowDataBound"
OnPageIndexChanging="gvParent_PageIndexChanging">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<img style="width: 20px; cursor: pointer;" src="/Media/newArrowClose.png" onclick="ShoeHide(this, 'tr<%# Eval("orderNumber") %>')" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Accept order Confirm / Decline" ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:ImageButton ID="btnGreen" Class="imagebutton green" ImageUrl="~/Media/green.png" OnClick="btnGreen_Click" OnClientClick="return confirm('Are you sure you?');"
CommandArgument='<%#Eval("ID_MSG_SLIP")%>' runat="server" />
<pop:ConfCollectionsPopup runat="server" id="ConfCollectionsPopup" />
CommandArgument='<%#Eval("ID_MSG_SLIP")%>' runat="server" />
<asp:ImageButton ID="btnRed" Class="imagebutton red" ImageUrl="~/Media/red.png"
CommandArgument='<%#Eval("ID_MSG_SLIP")%>' runat="server"/>
<pop:rejCollectionPopUp runat="server" id="rejCollectionPopUp" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="ServiceProvider" HeaderText="Service Provider" />
<asp:BoundField DataField="CollectionDueDate" HeaderText="Collection Due Date" />
<asp:BoundField DataField="CollectionPoint" HeaderText="Collection Point" />
<asp:BoundField DataField="OrderNumber" HeaderText="OrderNumber" />
<asp:BoundField DataField="ID_MSG_SLIP" ,HeaderText="ID_MSG_SLIP" HeaderStyle-CssClass="Hide" ItemStyle-CssClass="Hide" />/asp:GridView>