Can I find the row index of a row without clicking if I have the data array object of that row?
Can I find the row index of a row without clicking if I have the data array object of that row?
abhartiya
Posts: 5Questions: 3Answers: 0
I am doing some AJAX processing. As a result of this AJAX processing, I am drawing a table with data. Assume "rdata" is this JSON object.
After the AJAX processing is done, I am trying to perform another operation. Something like:
complete: function(){
for (k in rdata) {
rinfo = JSON.stringify(rdata[k]);
prow = ???
start_long_task2(rinfo, prow)
}
But, for this operation I need to know the row which I am operating on (prow). I have the information of the row data (rinfo). Is there a way I can search the Datatable and figure out which row I am working on based on the rinfo above?
This discussion has been closed.
Answers
Are you drawing the table for the first time? Or updating the contents of an existing table? They tend to be handled differently (at least I handle them differently).
In either case, I would do your start_long_task2() as part of a rowCallback so it always gets executed and it processed on a row by row basis. In that manner you are working on the actual row.