Deleting the contents of a GWT DataGrid Widget

1,716 views
Skip to first unread message

Bill M

unread,
Jan 5, 2012, 10:58:03 PM1/5/12
to Google Web Toolkit
Hi,

Would like to know if there is a direct way to delete ALL the rows of
the new DataGrid Widget -part of release GWT 2.4, or is the only way
to do it is by maintaining a handle to some Collection you may have
previously loaded into the Table, and then doing something like this
to delete the rows:

table = new DataGrid<Contact>();

dataProvider= new ListDataProvider<Contact>();
dataProvider.addDataDisplay(table);
...
...
(And when you want to remove ALL the rows of the DataGrid, do the
following?)

List<Contact> list= dataProvider.getList();
list.removeAll(CONTACTS);

Thanks.

Thomas Broyer

unread,
Jan 6, 2012, 4:08:31 AM1/6/12
to google-we...@googlegroups.com
dataProvider.getList().clear() ?

Bill M

unread,
Jan 7, 2012, 9:32:29 PM1/7/12
to Google Web Toolkit
Thanks. I actually got figured that one out yesterday!

Hey, have you used the DataGrid object?

Would you know if it is possible for this widget to grow in size if
you drag the browser to make it bigger? (i.e. User wants to see if
more rows in the display)

Thanks!
Bill

On Jan 6, 4:08 am, Thomas Broyer <t.bro...@gmail.com> wrote:
> dataProvider.getList().clear() ?

vaibhav jain

unread,
Jan 23, 2012, 1:47:54 PM1/23/12
to Google Web Toolkit
Hi,
Can you please mail me some example of data grid having
sorting ,paging and editable columns features,I am new to GWT and
haven't found any example in java doc.

Thanks in advance.

Regards,
Vaibhav
Reply all
Reply to author
Forward
0 new messages