【问题标题】:Bind DataGrid using ajax使用 ajax 绑定 DataGrid
【发布时间】:2011-08-26 05:09:48
【问题描述】:

是否可以使用 ajax 设置数据网格视图的数据源?我的目标是在单击超链接时绑定数据网格(在同一页面中)。请帮忙。

【问题讨论】:

    标签: asp.net ajax datagridview


    【解决方案1】:

    你应该改用LinkButton

    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        // set DataSource here .....
    }
    
      <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <%--  GridView--%>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="LinkButton1" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
    

    【讨论】:

      猜你喜欢
      • 2014-03-24
      • 1970-01-01
      • 1970-01-01
      • 2012-11-25
      • 1970-01-01
      • 1970-01-01
      • 2012-02-12
      • 2015-07-02
      • 1970-01-01
      相关资源
      最近更新 更多