This functions scans all the child nodes of the Table tag and delete the TD tag element depending on the column number specified.
function RemoveColumn()
{
var row, columnCount;
//send as parameter if it is dynamic value.
var columnToRemove = 1;
var tbody = document.getElementById('myTableBody');
for (var i = 0; i < tbody.rows.length; i++) {
row = tbody.rows[i];
columnCount = 0;
for (var j = 0; j < row.childNodes.length; j++) {
if (row.childNodes[j].nodeName == 'TD') {
if (columnCount == columnToRemove) {
row.removeChild(row.childNodes[j]);
break;
}
columnCount++;
} } } }