Function Callback as a datatable column

Function Callback as a datatable column

silenssilens Posts: 101Questions: 40Answers: 0

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"}, ]

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    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

  • silenssilens Posts: 101Questions: 40Answers: 0

    Hello Colin, in this case it is very difficult to make a demonstrable case. Sorry

This discussion has been closed.