New Row Is Added but table cell click event is not recognized

New Row Is Added but table cell click event is not recognized

rmacleodrmacleod Posts: 2Questions: 0Answers: 0
edited March 2011 in General
First off - the product is fantastic! I do however have one little problem.

After adding a row to the table using a modal popup, I can delete the existing rows but not the new row. The following is an abbreviated snippet of the function used to delete a row.

$('#grid tbody td').click(function() {
...
oTable.fnDeleteRow(oTable.fnGetPosition(row));
...
}

The problem is that the new row is not 'trapped' using the above selector.

I would greatly appreciate any help I can get with this problem - I have a feeling it's something dumb that I'm missing.

Thanks.

Replies

  • UPEngineerUPEngineer Posts: 93Questions: 0Answers: 1
    Use a live click event and see if that helps...

    Instead of:
    [code]
    $('#grid tbody td').click(function()
    [/code]
    Use:
    [code]
    $('#grid tbody td').live("click", function()
    [/code]
    See if that helps.
  • rmacleodrmacleod Posts: 2Questions: 0Answers: 0
    That did it! Thanks for the quick turn around.
This discussion has been closed.