Hi Saroeun,
Please add below script in the footer of the grid question. In "grid_row1", change row number before which you want to add the subheader. Then give the colspan and change it to 1+number of columns.
<script>
$(document).ready(function(){
$(".grid_row1").before("<td colspan='6'>ABC</td>");
$(".grid_row3").before("<td colspan='6'>PQR</td>");
});
</script>
Using above script, the text "ABC" will appear as a header before row 1 if the question has 5 columns. And the text "PQR" will appear as a header before row 3 if the question has 5 columns.
I hope this helps.
Regards,
Rahul Mittal