更新面板内的按钮单击会导致所有页面被禁用

时间:2016-02-27 09:11:09

标签: c# asp.net

我在更新面板内有一个按钮,此按钮填充同一更新面板内的网格视图,当单击此按钮时,所有页面控件都被禁用,我无法在此页面上执行任何操作。 我试图使更新面板更新模式为条件,但同样的情况发生。 页面仅在清除此页面中的所有更新面板时有效? `                                                                                               

                                                                         XYZ

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

                                <div id="Div18" >
                                    <asp:GridView ID="gvinnertranssides" runat="server" BackColor="White"
                                        BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3"
                                        ForeColor="Black" GridLines="Vertical" Height="16px" Width="100%" CssClass="Grid"
                                        AutoGenerateColumns="False" OnRowCommand="gvinnertranssides_ItemCommand" OnPageIndexChanging="gvinnertranssides_PageIndexChanging" AllowPaging="true" PageSize="10">
                                        <Columns>
                                            <asp:BoundField DataField="x" HeaderText="x" SortExpression="x" Visible="true" />
                                            <asp:BoundField DataField="Y" HeaderText="Y" SortExpression="Y" Visible="true" />

                                            <asp:BoundField DataField="Serial" HeaderText="Serial" SortExpression="Serial" />
                                            <asp:BoundField DataField="SideName" HeaderText="SideName" SortExpression="SideName" />
                                            <asp:BoundField DataField="SectionName" HeaderText="القسم" SortExpression="SectionName" />
                                        </Columns>
                                    </asp:GridView>


                                </div>
                            </div>
                        </div>
                                </ContentTemplate>
                        </asp:updatepanel>

`

1 个答案:

答案 0 :(得分:0)

对不起,我不能评论问题声誉是否低于50。

请提供更新面板和datagrid的代码。 我有以下UpdatePanel,它对我来说非常适合。

 <asp:UpdatePanel ID="UpdatePanelSearch" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:Panel ID="Panel2" runat="server" Width="100%" Height="500px" 
                                            ScrollBars="Auto" ondatabinding="Page_Load">

                                            <asp:DataGrid ID="grdacwReport" runat="server" CssClass="GridViewStyle" 
                                                Width="100%" ondatabinding="Page_Load"

                                                PageSize="100" >

                                                <FooterStyle CssClass="GridViewFooterStyle" HorizontalAlign="Center" 
                                                    VerticalAlign="Bottom" />
                                                <ItemStyle CssClass="GridViewRowStyle" />
                                                <PagerStyle CssClass="GridViewPagerStyle" HorizontalAlign="Center" 
                                                    NextPageText=">>" PageButtonCount="100" PrevPageText="<<" 
                                                    VerticalAlign="Bottom" />
                                                <AlternatingItemStyle CssClass="GridViewAlternatingRowStyle" />
                                                <HeaderStyle CssClass="GridViewHeaderStyle" />

                                            </asp:DataGrid>

                                        </asp:Panel>
                                    </ContentTemplate>
                                </asp:UpdatePanel>