Adding 'Action' links to DataTables rows

Adding 'Action' links to DataTables rows

pukkpukk Posts: 3Questions: 0Answers: 0
edited November 2012 in General
I use DataTables to display a list of books stored in a database. Because there are so many books, I use AJAX to fetch the data. For each record, I want to display the 'book title', 'author' and 'publishing year'. I also want an 'Actions' column, which holds links to that record's 'view', 'edit' and 'delete' pages. Does anyone know how to achieve this using jQuery/JavaScript? Remember that the 'id' of each record should not be displayed in the table, so I can't use a jQuery selector for this.

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Use a combination of mData , mRender and sDefaultContent . The exact options you want will depend upon your data structure. There is an example here: http://editor.datatables.net/release/DataTables/extras/Editor/examples/inlineControls.html
This discussion has been closed.