我使用的是来自GWT2.1.0.M3的CellTable。有removeColumn函数,但没有removeAllColumns或任何东西。因为"columns“是CellTable的私有成员,所以即使是我的CellTable扩展也不能轻松地访问它。
现在,我只存储我添加的列数,这样我就可以记住将它们全部删除。有人知道更好的方法吗?
发布于 2012-07-20 07:13:54
我就是这样用的
的列数
int count = this.getView().getTbcell().getColumnCount();
for(int i=0;i<count;i++){ this.getView().getTbcell().removeColumn(0); }
就这样,我们完成了:-)
发布于 2014-12-12 00:59:03
while (cellTable.getColumnCount() > 0) {
cellTable.removeColumn(0);
}发布于 2010-10-08 10:03:50
这可能不是你想要的,但它对我很有效:
getCellTable().setVisibleRange(0, 0);
listViewAdapter.updateRowData(0, result);
getCellTable().setVisibleRange(0, 10);https://stackoverflow.com/questions/3772480
复制相似问题