Forcing a GridView refresh

User d8f8e55d39

02-10-2011 19:08:27

Hello -

I'm using IJC 5.6.0 and i've written an IJC plugin which requires a GridView to be open, and the user to have selected rows in that grid view.

After some actions taken on those row contents by the plugin, it updates some of their column's values in the local database (via DFEntityDataProvider.update(…)).

The problem is that i cannot get the grid view to update its UI to reflect the changes without closing the grid view tab in IJC and reopening that view from the left pane. I've tried, one at a time:

and none of these resulted in the UI reflecting the new data in the local database.

Can someone give me a pointer as to what i can do to programmatically address this?

ChemAxon e189db4705

04-10-2011 00:36:24

Calling DFEntityDataProvider.update method should really start chain of events which finally repaints content of grid view or any other widget in form.

This is the same way how for example paste in gridview works. It also updates value in data layer (entity data provider) and all other layers above (mainly user interface) are notified through listeners.

Is it strange that it doesn't work as there are no known issues with copy/paste.

As for other approaches:

Maybe it can be useful to know what value is returned from various objects after you call update(), specifically what return DFEntityDataProvider.getData(...) - is this returns correctly updated value then what returns vertexTableModel.getValueAt(...) and possibly also appropriate DFResultSet's rootVertex.getData(...).

One more idea: this auto-refresh data in gridview can work only when DFEntityDataProvider instance is in the same instance of schema like opened gridview. I mean if you are connected twice and doing changes in one connection (even within the same running IJC) then it won't refresh data in forms opened within a different connection.

If it's possible feel free to send me relevant part of your code (this part with update call) so I can check it (phamernik at chemaxon dot com).