Are you trying to delete all but one row? If so, then it's working fine for me. If you want to delete ALL of the selected rows, even if it clears the table, you need to change
if (rowCount <=1) {
to
if (rowCount <=0) {
because you are preventing them from deleting the last row if the table only has 1 row left.
It works fine in my simple HTML file I used to test your snippet:
<html>
<head>
<Script type="text/javascript">
function deleteRow(tblPartner) {
debugger;
try {
var table = document.getElementById(tblPartner);
var rowCount = table.rows.length;
for (var i = 0; i < rowCount; i++) {
var row = table.rows[i];
var chkBox = row.cells[0].childNodes[0];
if (null != chkBox && true == chkBox.checked) {
if (rowCount <=0) {
alert("Cannot delete all the rows.");
break;
}
table.deleteRow(i);
rowCount--;
i--;
}
}
} catch (e) {
alert(e);
}
}
</Script>
</head>
<body>
<table border="1" id="tblPartner">
<tr>
<td><input type="checkbox" />1-1</td>
<td>1-2</td>
<td>1-3</td>
</tr>
<tr>
<td><input type="checkbox" />2-1</td>
<td>2-2</td>
<td>2-3</td>
</tr>
<tr>
<td><input type="checkbox" />3-1</td>
<td>3-2</td>
<td>3-3</td>
</tr>
</table>
<input type="Button" runat="server" Value="Remove" önclick="deleteRow('tblPartner')"/>
</body>
</html>