从 CellTable 中删除所有列 [英] Remove all columns from a CellTable

查看:19
本文介绍了从 CellTable 中删除所有列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 GWT 2.1.0.M3 中的 CellTable.有 removeColumn 函数,但没有 removeAllColumns 或任何东西.由于列"是 CellTable 的私有成员,因此即使是我的 CellTable 扩展也无法轻松访问它.

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 even my extension of CellTable can easily access it.

现在,我只是存储我添加的列数,以便我记得将它们全部删除.有人知道更好的方法吗?

For now, I'm just storing the number of columns I add so I can remember to remove them all. Anyone know a better way?

推荐答案

while (cellTable.getColumnCount() > 0) {
    cellTable.removeColumn(0);
}

这篇关于从 CellTable 中删除所有列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆