SMART datagrid v.1 > Classes > GridView
Add the data field being connected to column to index location of the existing row group field list. The field which has already done grouping will not be added again. And, in the case of merged mode, the column should be root column.
$('#groupby').click(function (ev) {
var column = grid.focusedColumn();
if (column instanceof DataColumn) {
if (grid.addGroupBy(grid.rowGroupLevels(), column)) {
console.log('GroupBy field is added: ' + column.dataIndex()
}
});