Adding a button with click function in drill-down/hidden row

Adding a button with click function in drill-down/hidden row

staticumstaticum Posts: 7Questions: 0Answers: 0
edited May 2013 in DataTables 1.9
Hi All,

Would someone be able to suggest in this example code : http://www.datatables.net/blog/Drill-down_rows - how can I add a button to the hidden row and attach a function to that buttons click. Basically I have a text area in a hidden row and I want to save its content back to an ajax data source on click.

Donation on the wy! Cheers.

Replies

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    This relates to your other discussion here: http://datatables.net/forums/discussion/15429 .

    You'd use the approach I mention in the other discussion with a jQuery event listener:

    [code]
    $('body').on( 'submit', '#SomeDataTable form', function (e) {
    ...
    } );
    [/code]

    That's a form submit - obviously you could listen for a 'click' on an individual button element as well if you wanted.

    Regards,
    Allan
This discussion has been closed.