Updating a single row (or a cell) in a DataGrid with a ListProvider

935 views
Skip to first unread message

Maero Polo

unread,
Nov 16, 2011, 4:46:47 AM11/16/11
to Google Web Toolkit
Hello,

I am using a DataGrid and sadely, I have to display many rows in the
same page(at least 300 lines).
I am using a ListProvider that is filled by a RPC service.

For the moment, when an update occurs, I do a "refresh" on the
ListProvider. It updates my DataGrid but it may take a long time (for
the user feeling) of two or three seconds. During that time the
DataGrid is "freezed".

I would like to know if there is a way of updating only a single row
to avoid this "freeze".

Regards,

M.

Juan Pablo Gardella

unread,
Nov 16, 2011, 6:22:28 AM11/16/11
to google-we...@googlegroups.com
Check here: http://stackoverflow.com/questions/6202982/how-to-programmatically-update-specific-row-in-gwt-celltable 
Again Thomas Broyer help. Is about CellTable, but I think is similar to DataGrid.

2011/11/16 Maero Polo <maer...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Thomas Broyer

unread,
Nov 16, 2011, 11:15:55 AM11/16/11
to google-we...@googlegroups.com
Using a ListDataProvider, setting the item to itself in the list should do it:

dataProvider.getList().set(index, dataProvider.getList().get(index));

though I'm not sure whether it'll redraw the whole table or only the needed rows.

Maero Polo

unread,
Nov 17, 2011, 5:29:14 AM11/17/11
to Google Web Toolkit
Hello,

Thanks for your advice : calling "dataProvider.getList().set" works
and the whole table is not fully redrawn.

I have also found an other solution by modifying my object to be
displayed and then by calling cellTable.updateRow(index).

Thanks again.
Reply all
Reply to author
Forward
0 new messages