Evan
Evan

Reputation: 125

Get all cells from a specific row in JQuery Datatables

I need get all data from a specific row in datatables. How can I achieve this? I have not found anything in the API documentation.

Upvotes: 1

Views: 2232

Answers (1)

Ash
Ash

Reputation: 2108

I think row().data() is what you are looking for:

var table = $('#myTable').DataTable();

$('#btn').on('click', function () {
    var rowData = table.row(0).data();
});

See example here.

Upvotes: 2

Related Questions