Skip to content

Commit 0954a64

Browse files
committed
Add readme for Table and DataTable kind.
1 parent 8af6aa1 commit 0954a64

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Table/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
@author Martin Kleinschrodt
2+
Copyright (c) by MaKleSoft
3+
This code is provided "as is", without any kind of warranty.
4+
http://www.maklesoft.com
5+
6+
## Table
7+
The table kind allows to generate any kind of tabular layout using Repeater-like event-based cell rendering. For example the enyo code
8+
9+
{
10+
kind: "Table", colCount: 2, rowCount: 2, onSetupCell: "setupCell"
11+
},
12+
setupCell: function(sender, rowIndex, colIndex) {
13+
return "cell " + rowIndex + "," + colIndex;
14+
}
15+
16+
produces the following markup:
17+
18+
<table>
19+
<tbody>
20+
<tr><td>cell 0,0</td><td>cell 0,1</td></tr>
21+
<tr><td>cell 1,0</td><td>cell 1,1</td></tr>
22+
</tbody>
23+
</table>
24+
25+
You can also fill the cells with any kind of enyo control. For example:
26+
27+
setupCell: function() {
28+
return {kind: "Input", value: "cell " + rowIndex + "," + colIndex};
29+
}
30+
31+
## DataTable
32+
33+
A control that is designed to display and/or collect tabular data. This implementation uses the maklesoft.Table kind for displaying the data. Aside from editing cells and deleting and adding rows and columns this control also supports various selection modes and dynamical styling of cells. For more info see the source doku. An example can be found in the DataTableExample kind.

0 commit comments

Comments
 (0)