C#ASP.NET GridView和更新面板 [英] C# ASP.NET GridView and Update Panel

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

问题描述

如何在一个更新面板"x"中获取gridview,以在另一个更新面板"y"中更新gridview.

How do you get a gridview in one update panel "x" to update a gridview in another update panel "y".

我目前正在尝试通过调用UpdatePanel.update方法以编程方式执行此操作,但它不会刷新gridview

I am currently trying to do this programatically by calling the UpdatePanel.update method but its not refreshing the gridview

例如

in x.eventhandlerDeleted()

{

    y.datasource.databind();

    y.updatepanel.update()

}

这不起作用,有人可以建议

This is not working, could someone please advise

推荐答案

我已经尝试过了,

i have tried this,

如果y.updateMode = true属于我的,那么显式调用y.update()方法应该可以工作,而在我的情况下则无效.

If y.updateMode = true which mine is, then explicilitly calling the y.update() method should have then worked, which in my case is not.

任何原因,也许与它在同一页面的不同选项卡中有关.

any reasons why, maybe it has something todo with it being in different tabs in the same page.


您是否将UpdateMode设置为Conditional?
Did you set the UpdateMode to Conditional?


是的,我的两个更新面板都将updateMode设置为有条件,并且我明确地调用y.databind()和y.update(),但无法正常工作.

Yes both my update panels have the updateMode set to conditional and i am explicitly calling y.databind() and y.update() but its not working.

对我来说真的很奇怪


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

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