【发布时间】:2018-04-17 11:10:44
【问题描述】:
有没有一种方法不需要每次都重新创建表格来按需添加/删除表格小部件中的列?
根据我的研究,我找不到使用表格小部件完成此任务的方法。
【问题讨论】:
标签: qooxdoo
有没有一种方法不需要每次都重新创建表格来按需添加/删除表格小部件中的列?
根据我的研究,我找不到使用表格小部件完成此任务的方法。
【问题讨论】:
标签: qooxdoo
不,抱歉,这无法完成,如qx.ui.table.model.Abstract 中setColumns 方法的文档中的以下注释所述:
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 方法。
德雷尔
【讨论】: