Definition of common grid data format.
{
options: Object, //define grid level options
columns: Array, //define column list and header
rows: Array //define row list
}
{
options: {},
columns: ["Column 1", "Column 2", "Column 3"],
rows: [
["Cell 11", "Cell 12", "Cell 13"],
["Cell 21", "Cell 22", "Cell 23"],
["Cell 31", "Cell 32", "Cell 33"]
]
}
{
columns: [{
name: "Column 1",
otherKey: "Some Value"
}, {
name: "Column 2",
align: "center"
}, {
name: "Column 3",
align: "right"
}],
rows: [
["Cell 11", "Cell 12", "Cell 13"],
["Cell 21", "Cell 22", "Cell 23"],
["Cell 31", "Cell 32", "Cell 33"]
]
}
{
options: {},
columns: [{
id: "c1",
name: "Column 1",
otherKey: "Some Value"
}, {
id: "c2",
name: "Column 2"
}, {
id: "c3",
name: "Column 3"
}],
rows: [
{
c1: "Cell 11",
c2: "Cell 12",
c3: "Cell 13",
otherKey: "Some Value"
},
{
c1: "Cell 21",
c2: "Cell 22",
c3: "Cell 23"
},
{
c1: "Cell 31",
c2: "Cell 32",
c3: "Cell 33"
}
]
}
{
columns: [{
id: "c1",
name: "Column 1"
}, {
id: "g1",
name: "Group 1",
subs: [{
id: "c2",
name: "Column 2",
}, {
id: "c3",
name: "Column 3"
}]
}],
rows: [
{
c1: "Cell 11",
c2: "Cell 12",
c3: "Cell 13",
subs: [{
c1: "Sub 11-1",
c2: "Sub 11-2",
c3: "Sub 11-3"
}]
},
{
c1: "Cell 21",
c2: "Cell 22",
c3: "Cell 23"
},
{
c1: "Cell 31",
c2: "Cell 32",
c3: "Cell 33"
}
]
}