> My guess. > > After dataProvider.getList().add(foo) is executed, > DataDrid is updated asynchronously, > and you try to > dataGrid.getRowElement(...) > before this update happens. >
Right. ListDataProvider uses Scheduler.get().scheduleFinally() to update the DataGrid. That is done for performance as you don't want to update the DataGrid each time you call add() in a loop for example. Instead you just update it once when all modifications to the underlying List have been done. However you can force an immediate update of the DataGrid by calling ListDataProvider.flush(). -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.