如何根据我刚在另一个gridview上进行的更改来“刷新”/更新gridview? [英] How do I 'refresh'/update a gridview based on a change I just made on another gridview?

查看:48
本文介绍了如何根据我刚在另一个gridview上进行的更改来“刷新”/更新gridview?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VB.net(Visual Studio 2012,.NET 4.5版)



我有一个Gridview,我们称之为GridviewX,我在那里执行更新。在此特定更新之后,我已将数据源配置为业务对象,然后使用以下签名UpdateScore(参数1,参数2,参数3,参数)定义业务对象中名为UpdateScore的特定方法的更新 4)



GridviewX包含一个团队的分数,而GridviewY包含联盟的排名!

问题我在哪里'卡住是GridviewX更新的地方......它更新得很好,页面刷新了,但是,如何刷新其他gridview,gridviewY,包含基于分数的联赛排名?



在GridviewX上的分数更新后,我立即保存会话并尝试调用我已定义/分配的方法(数据源)GridviewY

GridviewY没关系,它显示了所需的信息,但是当GridviewX更新时,GridviewY没有更新。我怎样才能实现这个目标?



我已经尝试过GridviewY.databind(),但是我收到了一个异常错误(对象没有被引用)我不知道GridviewY.databind()是否是正确的方法!

此外,这可能无关紧要,但我根本不使用SQL ...我实现了所有这一切都是通过使用类/实例化。类是保存数据等的类。



非常感谢和任何有关如何解决GridviewY更新/刷新问题的信息将非常感激。



问候,



TheAbominable one! : - )

解决方案

这很简单



你正在创造方法



绑定分数()

和其他是

绑定联盟()



当你更新分数然后打电话

绑定联盟()



每当你更新分数时它会显示更新的数据

I'm using VB.net (Visual Studio 2012, .NET version 4.5)

I have a Gridview, let's call it GridviewX, where I perform an update. After this particular update, I have configured the data source to a business object and then define the 'update' to a particular method in the business object called "UpdateScore" with the following signature UpdateScore(parameter 1, parameter 2, parameter 3, parameter 4)

GridviewX contains the scores, say, of a team, and GridviewY contains the standings of the league!
The problem where I'm stuck is where the GridviewX is updated... it updates fine and the page is refreshed, BUT, how do I refresh the other gridview, gridviewY, the one containing the league standings based on the scores?

Immediately after the score on GridviewX is updated, I save the session and have tried to call the method to which I have defined/assigned (the data source) GridviewY
GridviewY is ok in that it shows the information needed, BUT when GridviewX is updated, GridviewY is NOT updated. How can I achieve this?

I have tried GridviewY.databind(), but I receive an exception error (something along the lines of object not being referenced)... I don't know if GridviewY.databind() is the correct way to go!
Also, this may be irrelevant, but I'm not using SQL at all... I'm achieving all this by using classes/instantiation. Classes are the ones keeping the data, etc.

Thanks and any information on how to solve the GridviewY update/refresh issue will be greatly appreciated.

Regards,

TheAbominable one! :-)

解决方案

this is very simple

you are creating methods

bind scores()
and other is
bind league()

when you are updating scores then call
bind league()

it will show you updated data everytime when you will update scores


这篇关于如何根据我刚在另一个gridview上进行的更改来“刷新”/更新gridview?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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