Add two fields and display them in a default field
Add two fields and display them in a default field
silens
Posts: 101Questions: 40Answers: 0
I would like to add two fields (num1 and num2) and show it in another defaultValue field
"columns": [
{"data": "id"},
{"data": "usr"},
{"data": "num1"},
{"data": "num2"},
{"defaultContent": "num1+num2"},
],
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Should use like this
Thanks for answering, I get an error, I do not know if I'm doing something wrong, the error says that cnt is not defined
my fault. write data: NULL, render: ….
This way I get the same error.
{
"data": 'Null',
render: function( data ) {
return data.cnt - data.cnt_apr;
}
},
null not in quote. data: null, render:
Muchisimas gracias