Adding non-database field doesnt work, pls help

Adding non-database field doesnt work, pls help

lukyluky Posts: 4Questions: 0Answers: 0
edited February 2012 in General
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

Replies

  • lukyluky Posts: 4Questions: 0Answers: 0
    aw i forgot on ERROR message:
    [code]
    DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
    [/code]
  • ouijaouija Posts: 4Questions: 0Answers: 0
    I am having a similar issue, any suggestions?
This discussion has been closed.