Adding non-database field doesnt work, pls help
Adding non-database field doesnt work, pls help
Hello, basic datatables are working good, but i want make new column for actions (edit,del)
my HTML:
[code]
id
column2
column3
column4
actions
[/code]
my server-side script:
[code]
$aColumns = array( 'id', 'column2', 'column3', 'column4',' ');
[/code]
my javascript:
[code]
$(document).ready(function() {
$('#novinky').dataTable({
//"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/js/DataTables/scripts/server_processing.php",
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumnDefs": [
{
"fnRender": function ( o, val ) {
//return o.aData[0] +' '+ o.aData[3];
return 'EDIT';
},
"aTargets": [ 4 ]
}
]
});
});
[/code]
WHERE IS THE MISTAKE OR WHAT I FORGOT ?
Thank you
my HTML:
[code]
id
column2
column3
column4
actions
[/code]
my server-side script:
[code]
$aColumns = array( 'id', 'column2', 'column3', 'column4',' ');
[/code]
my javascript:
[code]
$(document).ready(function() {
$('#novinky').dataTable({
//"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/js/DataTables/scripts/server_processing.php",
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumnDefs": [
{
"fnRender": function ( o, val ) {
//return o.aData[0] +' '+ o.aData[3];
return 'EDIT';
},
"aTargets": [ 4 ]
}
]
});
});
[/code]
WHERE IS THE MISTAKE OR WHAT I FORGOT ?
Thank you
This discussion has been closed.
Replies
[code]
DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
[/code]