table.deleteRow(index)

The deleteRow() method is used to delete the row at the specified position from a table.
Syntax
HTMLTableElement.deleteRow(index);

  • HTMLTableElement is a reference to a HTML table element.
  • index is the row index to be deleted.

function DeleteItem(img){
var grid = document.getElementById(grdCountersPeriods”);
var row = 0;
for(var i=1; i< grid.rows.length; i++){
if((grid.rows[i].cells[2].innerHTML).indexOf(img.id) != -1){
row = grid.rows[i].rowIndex
}
}
grid.deleteRow(row);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s