Set the ShowGroupPanel property of the grid to True. Then, drag a column header of the grid onto the group panel (displayed above the column headers) to group by that column. You can group by columns in code, too, by doing something like
dxDGrid1Column1.GroupIndex := 0;
dxDGrid1Column2.GroupIndex := 1;
ISTR this is explained in the OLH and illustrated in the examples.