如果我修复标头,jquery datatable列搜索过滤器不工作

时间:2015-03-12 07:47:38

标签: javascript jquery datatable

我们正在使用jquery数据表。如果我在搜索文本时没有在文本过滤器中显示onkeyup和aslo在选择框中。你能帮忙找到解决方案吗?

我的表格有以下代码。

    var dTable= $("table#tableid").dataTable({
   "bStateSave":true,"bDeferRender": true,"sPaginationType":"full_numbers","iDisplayLength":25,
        "fnStateSaveParams": function (oSettings, oData)
            {       

                if($('#enquerydata_range_from_5').val()){               
                    oData.from = $('#enquerydata_range_from_5').val();
                }else{
                    oData.from = '';
                }
                if($('#enquerydata_range_to_5').val()){             
                    oData.to = $('#enquerydata_range_to_5').val();
                }else{
                    oData.to = '';
                }           
            },
            "fnStateLoadParams": function (oSettings, oData)
            {               
                setTimeout(function(){ if(oData.from || oData.to){$('#enquerydata_range_from_5').val(oData.from); $('#enquerydata_range_to_5').val(oData.to); dTable.fnDraw(); }},500);     

            },




}).columnFilter({sPlaceHolder: "head:before",
                aoColumns: [ 
                            null,
                            { type: "c-name" },
                            { type: "contact" },    
                            { type: "project-name" },                               
                            null,                       
                            { type: "date-range" },
                            { type: "ptype-select" },
                            { type: "ptype-select" },
                            null,
                            { type: "ptype-select" },                               
                ]
}); 

new FixedHeader(dTable,{"alwaysCloneTop": true,"bStateSaveParams":false});

0 个答案:

没有答案