【问题标题】:update UpdatePanel based on changes to Gridview根据对 Gridview 的更改更新 UpdatePanel
【发布时间】:2012-01-26 00:54:53
【问题描述】:

我正在尝试根据对我的网格视图所做的更改有条件地更新我的更新面板。我遇到了麻烦。这是在 BugsGridView_RowUpdated 函数内部。

if ( /*Changes have been made to gridview */)
{
ActivityUpdatePanel.Update();
}

谢谢!

【问题讨论】:

    标签: ajax gridview updatepanel


    【解决方案1】:

    您是否尝试将您的 GridView 分配为您的 UpdatePanel 在您的 aspx 中的触发器?

    <asp:UpdatePanel ID="ActivityUpdatePanel" runat="server">
        <ContentTemplate>
            <asp:GridView ID="BugsGridView" runat="server" AutoGenerateColumns="false">       
                <Columns>        
                    ...
                </Columns>
            </asp:GridView>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="BugsGridView" EventName="RowUpdated" />
        </Triggers>
    </asp:UpdatePanel>
    

    我不确定事件名称 RowUpdated。

    编辑:也许正确的事件是RowUpdating

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-05
      • 2011-09-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多