SMART datagrid v.1 > Classes > GridDataSet
Insert the values which are transferred by values in row row location as new row.
If it is inserted successfully, it will return true. If row is less than 0 or greater than rowCount, it will throw an exception. values can be array or JSON object, and JSON object will be restructured as array according to field order and stored in data set.
// If it is inserted successfully, the event will be fired.
ds.onRowInserted = function (ds, row) {
var values = ds.getRowObject(row);
$('#value1').val(values['value1');
$('#value2').val(values['value2');
};
var row = grid.focusedRowIndex();
ds.insertRow(row, ['value1', 'value2', 111, false, 222]);
ds.insertRow(row + 1, {
'field1': 'value1',
'field2': 333
});