Show Hide rows in table in loop
Show Hide rows in table in loop
bagsiur
Posts: 1Questions: 1Answers: 0
I have fallowing pseudocode loop:
my_table.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
var data = this.data();
var row = this;
if(my_special_condition == true){
row.hide();
} else {
row.show();
}
});
Is important for me to show and hide rows in iterating loop. How can I do this ?
This discussion has been closed.
Answers
Hi @bagsiur ,
You can't hide and show rows like that. They can be removed with
row().remove()
and then added back in withrow.add()
. If you want the ability for them to be hidden/shown, you'll have to create a custom filter to remove the records.Cheers,
Colin