Docs

Data

ZingGrid is very flexible when it comes to inputting data into the grid.

Data Types

ZingGrid accepts arrays of arrays, arrays of objects, objects of objects, and nested objects.

Read more about the various data types ZingGrid accepts here.

Arrays of Arrays

[
  [
    "Aquarius",
    "January 20 - February 18",
    "Air"
  ] ...
]

Arrays of Objects

[
  {
    "Aquarius",
    "January 20 - February 18",
    "Air"
    } ...
]

Objects of Objects

{
  "entry1": {
    "sign": "Aquarius",
    "date": "January 20 - February 18",
    "element": "Air"
  } ...
}

Nested Objects

[
  "entry1": {
    "sign": "Aquarius",
    "info": {
      "date": "January 20 - February 18",
      "element": "Air"
      }
  } ...
]
Top

Data Attribute

Attach the data attribute to the <zing-grid> tag to insert data.

<zing-grid data='[...]'></zing-grid>
Top

Tag

Or add the data attribute to the <zg-data> tag as an alternative way to insert data.

<zing-grid>
  <zg-data data='[...]'></zg-data>
</zing-grid>
Top

Remote Data

To insert remote data, attach the src attribute to either the <zing-grid> or <zg-data> tag.

<zing-grid src="https://jsdocs-9d00d.firebaseio.com/browsers"></zing-grid>
<zing-grid>
  <zg-data src="https://jsdocs-9d00d.firebaseio.com/browsers"></zg-data>
</zing-grid>
Top