How to add calculated column in Editor
How to add calculated column in Editor
meskimeski
Posts: 7Questions: 4Answers: 0
Hi! Hope for your help!
I need to add calculated column in my datatable in editor
i have code like this:
var table = $('#data').DataTable( {
dom: "Bfrtipl",
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
scrollY: "600",
scrollCollapse: true,
paging: false,
ajax: 'server-response.php',
columns: [
{ data: 'id' },
{ data: 'date' },
{ data: 'destination' },
{ data: 'client' },
{ data: 'load' },
{ data: 'product' },
{ data: 'prepay' },
{ data: 'cpay' },
{ data: 'wpay' },
i need to add one more column where will be result of 'cpay' - (minus) 'wpay'
how can i make this?
This discussion has been closed.
Answers
Morning comes and issue comes:
i make it using render
the last line now like this:
But if use inline editor - i have error in console when click on calculated data
Yes, you can't edit the calculated column - you would edit the columns that the calculation is based on.
This example shows how you have have inline editing on specific columns only.
Allan