Excel like filter doesn't load on first time but only on subsequest load.

Excel like filter doesn't load on first time but only on subsequest load.

varunkaushishvarunkaushish Posts: 3Questions: 0Answers: 0
edited March 2012 in DataTables 1.9
I'm using http://datatables.net/examples/api/multi_filter_select.html to create excel like filter but the problem that i'm facing now is, it doesn't load for the first time but only after i refresh the page for subsequent time.
I'm using data available on the DOM to create the select filter.
[code]
j$(document).ready(function(){
oTable = j$("#tableID").dataTable( {
"fnPreDrawCallback": function() {
j$(".btn_green").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 600,
'overlayShow' : true
});
},
"bPaginate": true,
"bFilter": true,
"bSort": false,
"bAutoWidth": false,
"bProcessing": true,
"sPaginationType": "full_numbers",
"bStateSave": true,
"sDom": '<"top"fp<"clear">>rt<"bottom"p<"clear">>',
"fnInitComplete": function() {
var jqInputs = j$("thead td");
var oSettings = j$("#tableID").dataTable().fnSettings();
alert(oSettings.aoPreSearchCols.length);
for ( var i=0 ; i 0){
jqInputs.html(oSettings.aoPreSearchCols[i].sSearch);
//jqInputs.innerHtml = oSettings.aoPreSearchCols[i].sSearch;
}
}
}
});[/code]

Replies

This discussion has been closed.