SMART datagrid v.1 > Classes > TreeDataSet
It inserts a new child row of which values are field values in the location of the indexth child row of the existing Data Row specified by parameter parent.
parent can specify TreeDataRow object or id. If parent is null, it will be added as the top row. values can be arrays according to field order or JSON objects of which field names are properties. Just before adding the row, onRowAdding event will be fired, and after adding it, onRowAdded event will be fired.
$('#btnAdd').click(function () {
var row = grid.focusedRow();
if (row) {
var vals = {
name: $('#name').val(),
value: $('#value').val()
};
dataset.insertRow(row.parent(), row.index(), vals);
}
});