GWT Datagrid selective refresh of some columns and not others

1.2k Views Asked by At

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

1

There are 1 best solutions below

2
On BEST ANSWER

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: