Qooxdoo表动态添加/删除列

时间:2018-04-17 11:10:45

标签: qooxdoo

有没有办法在每次根据需要添加/删除表格小部件中的列时重新创建表格?

根据我的研究,我无法通过表格小部件找到实现此目的的方法。

1 个答案:

答案 0 :(得分:2)

不,抱歉,无法完成,正如setColumnsqx.ui.table.model.Abstract方法的文档中的以下说明中所述:

Note: You can not change the number of columns this way. The number of columns is highly intertwined in the entire table operation, and dynamically changing it would require as much work as just recreating your table. If you must change the number of columns in a table then you should remove the table and add a new one.

但是,您可以使用列可见性功能显示和隐藏列,即列模型的setColumnVisibile方法。

Derrell