A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.dhtmlx.com/suite/grid/api/grid_data_config/ below:

JavaScript Grid - data Config

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:

  1. Starting with v7.1, you can specify the height for the necessary row of data via setting the number value to the height option when defining the data set:
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.

  1. Starting with v7.1, it is possible to use the Date() object when specifying data for the "Date" column:
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