Function Callback as a datatable column
Function Callback as a datatable column

I'm using jquery datatables. I would like a column of the data table to be the result of one of the data in the row ("name") + the result that returns a function to that call, passing it the id of that row. The fault it gives me is that the test is not defined. Thank you.
"columns": [
{"data": "id"},
{
"data": null,
render: function (data, type, row) {
nTareaC(data.id,function (numTarea) {
**prueba=data.name+numTarea;**
});
return prueba;
},
},
{"data": "apellidos"},
{"data": "tlf"},
]
This discussion has been closed.
Answers
Hi @silens ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hello Colin, in this case it is very difficult to make a demonstrable case. Sorry