Implementing click on row added using fnAddData

Implementing click on row added using fnAddData

JaquioJaquio Posts: 8Questions: 0Answers: 0
edited February 2013 in General
The data on the table was loaded using fnAddData. It worked well. Now, I'm trying to use the same example as fnGetData in http://www.datatables.net/api but the event is not firing.

The version of jQuery is 1.9.0 and DataTables 1.9.4.

Replies

  • JaquioJaquio Posts: 8Questions: 0Answers: 0
    So I solved the problem by wiring the event after I have populated the table:

    [code]
    $('#myTable TBODY TR').click(function () {
    alert(JSON.stringify($('#myTable').dataTable().fnGetData(this)));
    });
    [/code]
This discussion has been closed.