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 });

相关文章:

  • 2021-07-09
  • 2022-12-23
  • 2021-07-24
  • 2022-01-14
  • 2021-12-09
  • 2021-12-04
  • 2021-12-23
  • 2021-11-12
猜你喜欢
  • 2021-10-02
  • 2021-12-09
  • 2021-10-29
  • 2021-04-29
  • 2021-10-23
  • 2021-06-08
  • 2021-05-23
相关资源
相似解决方案