0

我正在为dataTable中的过滤行应用一个css类

 tableName.fnFilter( this.value, 0);
$(tableName.fnGetNodes()).addClass('diffColor');

但我需要迭代数据表中的所有过滤行。这可能吗。我该怎么做。提前致谢...

4

1 回答 1

0
May be its helpful for you 

var oTable = $("#Mytable").dataTable({whatever discribing your datatable});
//After the declaration of your datatable : 

var rowToAdd = true;
oTable.$('tr').each(function(){
var td_index = 0;
$(this).children('td').each(function){
 if($(this).value == mynewdata[td_index])
    rowToAdd = false;
 td_index++;
}
});
if(rowToAdd)
    oTable.fnAddData([Name,Age,Link,Schema,Visite,Info]);
于 2013-04-24T10:59:19.440 回答