w2grid.add

Adds a record or records to the grid.
add(record, [first])
record object or array, record(s) to add
first boolean, optional, indicates that record/s would be added to first
Returns integer.

Description

Adds a record or records to the grid by adding them into the .records array and calling the .refresh() method. The first argument record is the record object or an array of record objects. If you add multiple records at a time, it will only refresh the grid after all of them were added. Setting the second argument first to true, the records would be added to first line. By default records are inserted to the end of the grid.
Returns the number of records it adds.
If you define grid as: You can add records by: or several at a time: See .records array for the structure of the record object.

User Comments

comments powered by Disqus