In a list view you cannot use the "Group by" functionality on columns if the String type if their maximum lenght is greater that 255 characters. The "Group by" context menu item is greyed out.
List views and reports
This a default behavior.
There is a workaround for this issue, which involves adding the can_group attribute to the affected column of the table.
- Navigate to System Definition > Dictionary and access the record name you wish to edit
- Open the record and click on Advanced View under Related Links.
- In the Attributes field, add 'can_group=true' as the value of the Attributes field (without quotes) and save.