0

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.

serenesat
  • 4,611
  • 10
  • 37
  • 53
Evan
  • 115
  • 1
  • 11
  • 1
    possible duplicate of [jQuery DataTables Getting selected row values](http://stackoverflow.com/questions/29191760/jquery-datatables-getting-selected-row-values) – Ben N Jul 27 '15 at 00:09
  • 1
    this is pretty easy to look up in the reference manual as well as by doing google search. – charlietfl Jul 27 '15 at 00:11

1 Answers1

2

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.

Ash
  • 2,108
  • 2
  • 17
  • 22