我正在使用 GWT 2.1.0.M3 中的 CellTable。有 removeColumn 函数,但没有 removeAllColumns 或任何东西。由于“columns”是 CellTable 的私有(private)成员,因此即使是我的 CellTable 扩展也无法轻松访问它。
现在,我只存储我添加的列数,这样我就可以记住将它们全部删除。谁知道更好的方法?
最佳答案
我是这样用的
- 统计表格的列数
int count = this.getView().getTbcell().getColumnCount();
遍历并删除第一列
for(int i=0;i<count;i++){ this.getView().getTbcell().removeColumn(0); }
到此结束:-)
关于gwt - 从 CellTable 中删除所有列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3772480/