GWT Datagrid 选择性刷新某些列而不刷新其他列

发布于 2024-12-17 11:27:31 字数 490 浏览 5 评论 0原文

您好,我创建了一个 GWT 数据网格,其中有 10 列。其中 4 列用于用户输入的数据,其余是从数据库加载的值。我实现了一个计时器,每 2 秒刷新一次数据网格。这里 -

        final Timer timer = new Timer() {
        public void run() {
            refresh();
            schedule(2000);
        }
    };
    timer.schedule(2000);

refresh() 函数调用我的 dataProvider 实现中的 dataProvider.refresh()

但是,我的要求是仅定期更新 6 列,而用户输入列仅应在用户按下“回车”键或更新按钮时更新。

是否可以根据用户操作有选择地定期刷新某些列和其他列?

谢谢并问候

穆库尔

Hi I have created a GWT datagrid, which has 10 columns. Of these 4 columns are for user entered data, and the rest are values loaded from a database. I have implemented a timer that refreshes the datagrid every 2 seconds. Here -

        final Timer timer = new Timer() {
        public void run() {
            refresh();
            schedule(2000);
        }
    };
    timer.schedule(2000);

the refresh() function calls the dataProvider.refresh() in my dataProvider implementation.

However, my requirement is to only update the 6 columns regularly, while the user entry columns should only be updated when the user presses the "enter" key or an update button.

Is it possible to selectively refresh some columns periodically and some others based on user action?

Thanks and regards

Mukul

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

携君以终年 2024-12-24 11:27:31

我认为只能刷新整个 DataGrid 而不仅仅是特定列。但是,您始终可以扩展 DataGrid 并自己实现此功能。
您可以查看以下课程:

I think it is only possible to refresh the whole DataGrid and not only specific columns. However you could always extend the DataGrid and implement this functionality yourself.
You can check out following classes:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文