3

I am trying to update a cell table at run time, the cell table gets its date from a list

Cell_Table.setRowData(0,AllMessages);

I am trying to update the List AllMessages then do this Cell_Table.redraw(); with no success.

I am trying this do this again Cell_Table.setRowData(0,AllMessages); with no success AS WELL

when I am using the same technique to add rows, everything is ok but when i am removing some data from the list feeding it, the cell table is not being updated!

Anthony
  • 12,407
  • 12
  • 64
  • 88
Noor
  • 19,638
  • 38
  • 136
  • 254
  • When using the same technique, i am adding the cell table is being updated but when removing, it not updating – Noor Jan 05 '11 at 19:11

1 Answers1

6

by
John LaBanca

@ GWT Discussion

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);

Noor
  • 19,638
  • 38
  • 136
  • 254