SMART datagrid v.1 > Classes > TreeView
It returns Tree Row which has been connected to data row dataRow specified by parameter.
If none, it will return null.
function prepareRow() {...}
$('#insertRow').click(function () {
var row = treeMain.focusedRow();
if (row) {
var dataRow = row.dataRow();
var vals = prepareRow();
dataRow = dsMain.insertRow(dataRow, index, vals);
// If successfully add a row, it will display the newly created row and move the focus to that row.
if (dataRow) {
row.setExpanded(true);
row = treeMain.getRowOfDataRow(dataRow);
treeMain.setFocusedRow(row, true);
}
}
});