Assigns the grouping to the current header index.

def groupByHeaderIndex(self):
        """
        Assigns the grouping to the current header index.
        """
        index = self.headerMenuColumn()
        columnTitle = self.columnOf(index)
        tableType = self.tableType()
        
        if not tableType:
            return
        
        column = tableType.schema().column(columnTitle)
        if not column:
            return
        
        self.setGroupBy(column.name())
        self.setGroupingActive(True)