How can I add link or Button as an element or content of a DataTable Row.
As if I click the link or Button in the DataTable row it will do some javascript work or go to some other pages.
If you have 6 columns displayed in DTable and want to add Seventh column as "More" link, in each record, then do the following. Add "aoColumns" derivative with 6 null and 7th as your link using fnRender. Parameters to link url can also be passed as mentioned below.
Replies
http://www.datatables.net/examples/api/row_details.html
or you can just add a column and put or on that column.
Anjib
$(document).ready(function() {
$('#example').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "100%",
"bProcessing": true,
"bServerSide": true,
"aaSorting": [[1, "asc"]],
"sPaginationType": "full_numbers",
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], [code]
"aoColumns":[
null,null,null,null,null,null,
{ "fnRender": function (oObj) {
return '' + 'More' + '';
}
}
],
[/code]
"sAjaxSource": "scripts/team_processing.php"
} );
} );