SMART datagrid v.1 > Classes > TreeDataSet
It inserts one or more child rows by values transferred by rows after the indexth child row of the existing Data Row specified by parameter parent.
parent can specify TreeDataRow object or rowId. If parent is null, it will be added as the top row. rows can be an array of arrays according to field order or an array of JSON objects of which field names are properties. Just before adding rows, onRowsAdding event will be fired, and after adding them, onRowsAdded event will be fired.
$('#btnAdd').click(function () {
var row = grid.focusedRow();
var rows = [{
name: $('#name1').val(),
value: $('#value1').val()
}, {
name: $('#name2').val(),
value: $('#value2').val()
]];
dataset.insertRows(row.parent(), row.index(), rows);
});