# Loading data

The datagrid has several data inputs, which are all processed in the same way - columns, rows, headers and footers. The processing depends on the data type - you can assign array, number, string, function, promise (see the next section), or add custom processing via options.

const rows = [{
  "customerID": "ALFKI",
  "companyName": "Alfreds Futterkiste",
  "address": "Obere Str. 57",
  "city": "Berlin",
  "postalCode": "12209",
  "country": "Germany",
  "phone": "030-0074321",
  "fax": "030-0076545"
},
{
  // ...
}];

# Dynamic values

If your data is coming from the server and you need to modify or add some values on the client-side - you can use onColumn, onRow events, which are triggered for each data item before it is passed to the inner view rendering function.

const rows = [...];

function onRow(row){
    row.cells.localValue = calc(row.data);
}

# Updates

The data is treated as immutable (compare by reference). To update a record - clone an array and replace the record with a modified copy.