The rows can be grouped based on the sortField property. This feature is enabled by setting the rowGroupMode property value to rowspan (that is, rowGroupMode="rowspan"). An example of row grouping with row span would be written as follows:
<p-dataTable [value]="browsers" sortField="engine"
rowGroupMode="rowspan"
[styleClass]="'rowgroup-padding'">
<p-header>RowSpan</p-header>
<p-column field="engine" header="Engine" sortable="true"></p-column>
<p-column field="platform" header="Platform" sortable="true">
</p-column>
<p-column field="browser" header="Browser" sortable="true">
</p-column>
<p-column field="grade" header="Grade" sortable="true"></p-column>
</p-dataTable>
The following screenshot shows a snapshot result...