How to create a simple table?
There are two importent things exist in qooxdoo table class (qx.ui.table.Table) - Model and Selection.
The model represents the columns and data of the table, and the selection is used to control single or multi-selection.
var model = new qx.ui.table.model.Simple(); model.setColumns(["ID", "User Name", "Sex", "Age"]); model.setData([ ['1', 'Zhangsan', 'man', 17], ['2', 'Lisi', 'man', 23], ['3', 'Wanger', 'man', 25], ['4', 'Mazi', 'man', 20], ['5', 'Chunhua', 'woman', 18] ]); var table = new qx.ui.table.Table(model); table.set({ width: 600, height: 400 }); table.getSelectionModel().setSelectionMode(qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION); this.getRoot().add(table, { left: 20, top: 50 });
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦