Possible bug with row deletion?

Possible bug with row deletion?

ITDBITDB Posts: 2Questions: 0Answers: 0
edited November 2010 in General
I have a table with rows like this:

[code]


Blah

[/code]

When a button is clicked, the following loop is activated, which should delete every row in which the checkbox is checked:

[code]
$("#list_table input:checked").each(function() {
//set tempRow to the object
var tempRow = $(this).parent().parent();

//this works (proving that tempRow is defined correctly)
tempRow.css("background-color","#cff");

//I should be able to delete directly (option 1) - this doesn't delete the row
oTable.fnDeleteRow(tempRow);

//I should be able to delete based on position (option 2) - this throws an error
var tempPos = oTable.fnGetPosition(tempRow);
oTable.fnDeleteRow(tempPos);
});


[/code]

With option 1, the row doesn't get deleted. With option 2, I get the following error message from the console:
Uncaught TypeError: Cannot call method 'toUpperCase' of undefined (jquery.dataTables.min.js:120)

What is missing that would create that error? Surely it can't be that hard to delete these rows...
This discussion has been closed.