How to get all filtered rows
How to get all filtered rows
Hi all,
I want to iterate over all the filtered rows of a table to change the value of a column.
Basically I want to do something like:
[code]
new_value = "Ok";
column_index = 4;
$.each(oTable._('tr', {"filter":"applied"}), function(i,v) {
var aPos = oTable.fnGetPosition(v);
console.log("ROW POSITION: " + aPos);
oTable.fnUpdate(new_value, aPos, column_index);
});
[/code]
But it seems that I can't get fnGetPosition from v:
"Uncaught TypeError: Cannot call method 'toUpperCase' of undefined"
Any ideas?
I want to iterate over all the filtered rows of a table to change the value of a column.
Basically I want to do something like:
[code]
new_value = "Ok";
column_index = 4;
$.each(oTable._('tr', {"filter":"applied"}), function(i,v) {
var aPos = oTable.fnGetPosition(v);
console.log("ROW POSITION: " + aPos);
oTable.fnUpdate(new_value, aPos, column_index);
});
[/code]
But it seems that I can't get fnGetPosition from v:
"Uncaught TypeError: Cannot call method 'toUpperCase' of undefined"
Any ideas?
This discussion has been closed.
Replies
oTable.$('tr', {"filter":"applied"}).each( function () {
oTable.fnUpdate( new_value, this, column_index );
} );
[/code]
:-)
Allan
I didn't see your answer before and had an instructive RTFM moment.
Thanks for the prompt reply!
Cheers,
M;