更新面板中的Gridview [英] Gridview inside Update Panel

查看:57
本文介绍了更新面板中的Gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨盖兹,
当我单击没有回发的按钮时,为什么updatepanel中的gridview不会自动更新其记录,请帮忙,这是我的代码,提前thnx

hi guyz,
why does my gridview inside the updatepanel does not update its record automatically when i click the button without postback, please help,,, here''s my code, thnx in advance

<div>
       <br />
       <asp:ScriptManager ID="ScriptManager1" runat="server">
       </asp:ScriptManager>
       <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <fieldset>
       <asp:GridView ID="GridView1" runat="server">
       </asp:GridView>
       </fieldset>
       </ContentTemplate>
         </asp:UpdatePanel>

   </div>

推荐答案

尝试在按钮事件中调用GridView1.DataBind()
try call GridView1.DataBind() in your button event


尝试使用JavaScript代码刷新UpdatePanel
http://weblogs.asp.net/jeffreyzhao/archive/2008/04/26/refresh-the-updatepanel-using-javascript-code.aspx [ http://codeclimber.net.nz/存档/2007/06/26/how-to-refresh-an-updatepanel-from-javascript.aspx [
try Refresh the UpdatePanel using JavaScript Code
http://weblogs.asp.net/jeffreyzhao/archive/2008/04/26/refresh-the-updatepanel-using-javascript-code.aspx[^]
http://codeclimber.net.nz/archive/2007/06/26/how-to-refresh-an-updatepanel-from-javascript.aspx[^]


may help .


您的按钮不在更新面板中
your button is out from update panel


这篇关于更新面板中的Gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆