Hi,
I got the following solution. I wrote this function for my problem. In order for this to work I have to retain the value of the grid and kept refreshing it with the data whenever I had a change in UI. It works very well. For any details please comment.
function groupData() {
var table = document.getElementById("list_frozen");
var spansize = table.rows.length - 2;
for (var i = 2, row; row = table.rows[i]; i++) {
if (i < table.rows.length - 1) {
for (var j = 0, col; col = row.cells[j] && j < 1; j++) {
row.deleteCell(j);
}
}
}
$("#list_frozen tbody tr:nth-child(2) > td:nth-child(1)").attr('rowspan', spansize);
}