Question

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

Was it helpful?

Solution

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:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top