Closed sebasira closed 6 years ago
I think you need to set orderable
and searchable
to false
:
{
"data": null,
"render": function(data, type, row){
return "<button id='editbutton' class='btn btn-primary'>Edit</button>";
},
"orderable": false,
"searchable": false
}
I'm using version 4.3 of spring-data-jpa-datatables. Working fine with GET and POST to retrieve the data, now I wanted to add a button in a row, so this is what I add to the columns:
If using GET I get this error:
and if using POST I get:
I debug the app, and I can tell that in both cases the DataTablesOutput object to return has indeed the extra column with attribute
data=null
The workaround I found to solve this is to define the data of that column as any other valid attribute of the model, and then the render function will overwrite it. For example:
EDIT
I'd like to add that I'm using. the
jquery.spring-friendly.js
when using GET