w2grid.records

Array of record objects.
Array, default = []
You can define records during object creation or during run-time. Generally, there are two data source types: local and remote. If you do not defined the .url property the data source is local and you can add records to the grid in the following way: After object creation you can add records either by appending them to the .records array ( do not forget to call .refresh method to update on the screen), or by using .add() method, which will add and update records on the screen.
If you defined the .url, the records will be loaded from this url overwriting any locally defined records.

The record object

Each record object must have a recid property that uniquely identifies the record. Also it might have some other system properties: style, summary, and editable.
The following is the structure of the record object: Where "field-1", ..., "field-N" have to correspond to the field property of the columns they need to be displayed in. You can use render method of the column to create columns that have aggregates from several fields. See .columns property.

User Comments

comments powered by Disqus