Reading row data

Reading row data

jeffrobinsonjeffrobinson Posts: 4Questions: 0Answers: 0
edited October 2011 in General
Is it possible to add an event to a clicking on a row that would call a function with that's rows data as parameters?
Thanks - J

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    It most certainly is :-). DataTables' API can be used to get the data for a row: http://datatables.net/api#fnGetData

    [code]
    var table = $('#example').dataTable();

    $('#example').live( 'click', function () {
    myFunction( table.fnGetData( this ) );
    } );
    [/code]

    Allan
This discussion has been closed.