Optional. Specifies an array of data objects to set into the grid
info
Please note that if you specify the id
fields in the data collection, their values should be unique. You can also omit the id
fields in the data collection. In this case they will be generated automatically.
const dataset = [
{
"country": "China",
"population": "1415045928",
"yearlyChange": "0.0039",
"netChange": "5528531",
"id": "1"
},
{
"country": "India",
"population": "1354051854",
"yearlyChange": "0.0111",
"netChange": "14871727",
"id": "2"
},
];
const grid = new dhx.Grid("grid_container", {
columns: [
],
data: dataset
});
Related samples:
const dataset = [
{
"country": "China",
"population": "1415045928",
"height": 80,
"id": "1"
},
{
"country": "India",
"population": "1354051854",
"id": "2",
}
];
Related sample: Grid. Row height
note
The height
option has a higher priority than the autoHeight:true configuration property of Grid.
Thus, autoHeight:true will be ignored for the cell that the height
option is defined to.
const dataset = [
{
"country": "China",
"date": new Date()
},
{
"country": "India",
"date": new Date(2010, 02, 10)
}
];
Related sample: Grid. Date column and support of the Date() object
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4