rows().every() only by array of indexes
rows().every() only by array of indexes
itajackass
Posts: 162Questions: 48Answers: 3
I've a datatables where i've to some calculation.
but only some row i need to read, by an index array.
For example if i've an array like: var arr = [0,1,3,5]; i need to loop inside the table limited for rows: 0,1,3,5 only.
Is it possible to use a function like: table.rows({[0,1,3,5]}).every() ?
My fiddle to implement http://jsfiddle.net/bbLjzspf/5398/
This discussion has been closed.
Answers
Important: I know i can loop all rows and check if the rowIdx is in array arr to do my calc., but for some problems/variables I omitted in this example, I can't used this method. I need to limit loop only!
Ok this works: