For removing a specific element from the cellTable, I found in the meantime the following solution:
cellTable.setVisibleRangeAndClearData(cellTable.getVisibleRange(), true); This method call will generate a range change event, which will reload the data from the cellTable. On Wednesday, November 21, 2012 3:12:17 PM UTC+1, Marius Grama wrote: > > Hi, > > i am working with a CellTable backed by an AsyncDataProvider. > > Can anybody tell how to solve the following two scenarios: > 1. remove all elements from the cellTable > I currently make asyncDataProvider.setRowCount(0,true); > but this triggers onRangeChanged(HasData<XXX> display) on the > asyncDataProvider causing a new asynchronous call which I'd like to avoid. > > 2. remove a specific element from the cellTable. Once a row gets selected > and the user chooses to delete the entry, with a ListDataProvider I just > had to remove the element from the list > listDataProvider.getList().remove(elementToBeDeleted); > backing the provider and the cellTable was refreshed. > With an AsyncDataProvider this possibility is not given and I am not sure > how to deal with it. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/soCitu7OovAJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.