2013-04-24 54 views
0

遍历我使用获取的数据表中的所有过滤的行使用jQuery

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

应用CSS类过滤的行DataTable中,但我需要遍历DataTable中。就是所有的过滤行它possible.How我可以做到这一点。 在此先感谢...

回答

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]); 
相关问题