addColumnGroup method
Call this method to add a specified ColumnGroup to the column grouping.
Implementation
void addColumnGroup(ColumnGroup columnGroup) {
_groupedColumns.add(columnGroup);
if (columnGroup.sortGroupRows) {
if (!sortedColumns.any(
(SortColumnDetails element) => element.name == columnGroup.name)) {
sortedColumns.add(SortColumnDetails(
name: columnGroup.name,
sortDirection: DataGridSortDirection.ascending,
));
}
}
if (_dataGridStateDetails != null) {
_refreshGrouping(_dataGridStateDetails!());
}
}