Clear Cell table data

655 views
Skip to first unread message

lucky

unread,
Jun 11, 2012, 11:43:45 AM6/11/12
to google-we...@googlegroups.com
How to clear celltable data when i click on the Button 'Clear'?

i tried with cellTable.setRowCount(0);
and
private void clearTable() {
        if (dataProvider.getDataDisplays() != null && dataProvider.getDataDisplays().isEmpty() == false) {
            dataProvider.removeDataDisplay(cellTable);
        }

        cellTable.setVisibleRangeAndClearData(resultListGrid.getVisibleRange(), true);
       
    }

but this is not working for me.

Could you please tell me did i do any thing wrong ?
or let me know the best way to clear the cellTable data

Thanks in advance.

lucky

unread,
Aug 28, 2012, 10:28:26 AM8/28/12
to google-we...@googlegroups.com
Can any one help me on this?

Thad

unread,
Aug 30, 2012, 11:44:16 AM8/30/12
to google-we...@googlegroups.com
I create an empty ArrayList of my data and assign it to my CellTable:

    data = new ArrayList<TextHexRow>();
    ...
    hexArea.setRowCount(data.size(), true);
    hexArea.setRowData(0, data);

There may well be better ways (there is so much to understand about cell views).

Kara Marie Rawson

unread,
Aug 28, 2012, 10:51:13 AM8/28/12
to google-we...@googlegroups.com
try updating your row count and row data. 

getDataGrid().setRowCount(getDataCount(), true);
getAsyncDataProvider().updateRowCount(getDataCount(), 
getAsyncDataProvider().updateRowData(getOffset(), getDataList());

rather then using my async provider you would get your list provider or whatever else. This provider is bound to the cell table (datagrid and cell table are the same thing for the most part.)

kara

--
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/-/9c-T_-LkYvwJ.
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.

Reply all
Reply to author
Forward
0 new messages