Remove all columns from a CellTable

后端 未结 3 1648
北恋
北恋 2020-12-11 09:24

I\'m using a CellTable from GWT 2.1.0.M3. There are removeColumn functions, but no removeAllColumns or anything. Since \"columns\" is a private member of CellTable, not ev

相关标签:
3条回答
  • 2020-12-11 09:57
    while (cellTable.getColumnCount() > 0) {
        cellTable.removeColumn(0);
    }
    
    0 讨论(0)
  • 2020-12-11 10:06

    I am using this way

    1. Take count of columns of table

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

    1. Loop through and remove first column

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

    Thats it we are done :-)

    0 讨论(0)
  • 2020-12-11 10:11

    This might not be what your looking for but it works for me:

    getCellTable().setVisibleRange(0, 0);
    listViewAdapter.updateRowData(0, result);
    getCellTable().setVisibleRange(0, 10);
    
    0 讨论(0)
提交回复
热议问题