problem deleting rows from table with multiple checkboxes in each row

problem deleting rows from table with multiple checkboxes in each row

pubstatvoidmainpubstatvoidmain Posts: 4Questions: 0Answers: 0
edited January 2013 in General
First time poster here who has been using datatables for a week

I have two checkboxes in each row of my table and want to delete the rows based on if the first checkbox is ticked.

http://live.datatables.net/ufawup

This filter deletes all rows with either checkbox ticked which is not exactly what I want ...

table.$('tr:has(:checkbox:checked)').each(function(){

So this filter seemed to work ...

table.$('tr:has(input[name=chkSelected]:checked)').each(function(){

but when I add a new row and tick it, or tick a row that is initially unticked, they fail to get deleted!?

The original filter doesnt seem to have this problem?

Is this a bug in my code or datatables or jquery?

Any help greatly appreciated!

thanks

Replies

  • pubstatvoidmainpubstatvoidmain Posts: 4Questions: 0Answers: 0
    I got it, I had a caps typo mismatch on the checkbox names!

    Code, fixed and working now

    http://live.datatables.net/ufawup/2
This discussion has been closed.