Updating Cell Table at run time

257 views
Skip to first unread message

Noor

unread,
Jan 5, 2011, 12:56:24 PM1/5/11
to Google Web Toolkit
I am getting problem to update cell table at runtime.

I am trying this:

View.getTable().setRowData(0,NewMessages);

but does not work:

also trying

View.getTable().redraw();

with no success

Y2i

unread,
Jan 5, 2011, 1:31:23 PM1/5/11
to Google Web Toolkit
Did you setup table columns?
It might be also possible that your table is not visible (collapsed).
Try setting background color to red (using styles) to verify that if
it is visible.

Noor

unread,
Jan 5, 2011, 2:09:14 PM1/5/11
to Google Web Toolkit

When i am updating the cell table, it remaining as it is though the
data in the list supplying it has changed thrugh CRUD

Noor

unread,
Jan 5, 2011, 2:11:50 PM1/5/11
to Google Web Toolkit

When using the same technique, i am adding the cell table is being
updated but when removing, it not updating

John LaBanca

unread,
Jan 5, 2011, 2:21:58 PM1/5/11
to google-we...@googlegroups.com
setRowData(int, List) replaces the range of data.  So, if the list gets shorted, it doesn't touch the items that appear after the end of the list.

You have to update the row count as well:
table.setRowData(0, NewMessages);
table.setRowCount(NewMessages.size(), true);

Or, you can use the new version of setRowData that does not take a start index (since GWT 2.1.1):
table.setRowData(NewMessages);

Thanks,
John LaBanca
jlab...@google.com


On Wed, Jan 5, 2011 at 2:11 PM, Noor <bake...@gmail.com> wrote:

When using the same technique, i am adding the cell table is being
updated but when removing, it not updating

--
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.


Noor

unread,
Jan 5, 2011, 2:37:32 PM1/5/11
to Google Web Toolkit
@John LaBanca;
Thanks lot!!
Reply all
Reply to author
Forward
0 new messages