Remove all columns from CellTable

I am using CellTable from GWT 2.1.0.M3. There are removeColumn functions, but no removeAllColumns or anything else. Because the "columns" are a private member of CellTable, even my CellTable extension cannot easily access it.

Currently, I just keep the number of columns that I add, so I can forget to delete them. Does anyone know a better way?

+3
source share
3 answers

I use this method

  • Count the number of columns in a table

int count = this.getView().getTbcell().getColumnCount();

  • Scroll and delete the first column

    for(int i=0;i<count;i++){ this.getView().getTbcell().removeColumn(0); }

We did this :-)

+3
source

It may not be what you are looking for, but it works for me:

getCellTable().setVisibleRange(0, 0);
listViewAdapter.updateRowData(0, result);
getCellTable().setVisibleRange(0, 10);
+1
source
while (cellTable.getColumnCount() > 0) {
    cellTable.removeColumn(0);
}
+1
source

Source: https://habr.com/ru/post/1766062/


All Articles