SMART datagrid v.1 > Classes > GridView
DataLudi.GridView.groupBy method
Remove the existing row group and do row grouping in field order specified in fields array.
function groupBy (fields: [Integer|String]|Integer|String, sorting: Boolean, direction: SortDirection);
- Returns
- Void
- Parameters
- fields - [Integer|String]|Integer|String. required.
The array of
Index or
Field Name of which field will be grouped.
It does grouping based on the order which has been contained in array.
When specify only one field index or field name, you do not need to specify as array.
v 1.3.8 - sorting - Boolean. Defaults to true.
If it is true, it will do sorting before grouping.
- direction - SortDirection. Defaults to SortDirection.ASCENDING.
It specifies the sort direction.
Code -1
grid.onColumnHeaderDblClicked = function (grid, column) {
if (column instanceof DataColumn) {
grid.groupBy([column.dataIndex()]);
}
};
- See Also
- clearGroupBy
- addGroupBy
- removeGroupBy
- rowGrouped
- expand
- collapse
- Examples
- Row Grouping