SMART datagrid v.1 > Classes > GridDataSet
Except for transferring XML object to rows parameter, it is the same as appendRows.
// If rowEvents is false, the event will be fired when appending of all rows is committed.
ds.onRowsInserted = function (ds, row, count) {
console.log(row + '' + count + ' row has been appended in th row location.';
};
// If rowEvents is true, the event will be fired whenever each row is appended.
ds.onRowInserted = function (ds, row) {
console.log(row + 'One row has been appended in th row location.';
};
// rows parameter is XML object.
// If the count is -1, it will append all rows of rows, and if it is greater than 0, it will append as much as Math.min(count, rows.length).
//|
|
var rows = '<rows><row id="1" userid="smccoy" company="Fivespan" first_name="Jane"/><row id="2" userid="smccoy" company="Fivespan" first_name="Jane"/></rows>';
rows = DataLudi.parseXml(rows).documentElement.childNodes;
ds.appendXmlRows(rows, 0, -1, false);