如何在jquery数据表中获取单个列过滤器 [英] how to get individual column filter in jquery datatable

查看:83
本文介绍了如何在jquery数据表中获取单个列过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

am using jquery datatable of new version,i want to add column filter for every column seperately but am not getting any result.this is the code am using,


<pre lang="cs">var oTable=$(&quot;#example&quot;).dataTable({
    &quot;bJQueryUI&quot;: true,
    &quot;sScrollX&quot;: &quot;100%&quot;,
    &quot;bFilter&quot;: false,
           &quot;aLengthMenu&quot;: [[10, 25, 50, -1], [10, 25, 50, &quot;All&quot;]],
    &quot;iDisplayLength&quot;: 10,
    &quot;sPaginationType&quot;:&quot;full_numbers&quot;
}).columnFilter({
    &quot;aoColumns&quot;: [
        { type: &quot;text&quot; }, null, null, null, null, null, null

    ]<pre lang="Javascript"></pre>
})</pre>




i have 7 columns,i want to add individual column filter for first column,i dont know where am missing.can anyone suggest

推荐答案

(& quot; #example& quot;)。dataTable({
& quot; bJQueryUI& quot;:true,
& quot; sScrollX& quot;:& quot; 100%& quot;,
& quot; bFilter& quot;:false,
&a mp;aLengthMenu& quot;:[[10,25,50,-1],[10,25,50,& quot; All& quot;]],
& quot; iDisplayLength& quot ;:10,
& quot; sPaginationType& quot;:& quot; full_numbers& quot;
})。columnFilter({
& quot; aoColumns& quot;:[
{type:& quot; text& quot;},null,null,null,null,null ,null

] < pre lang = Javascript > < / pre >
})< / pre >
(&quot;#example&quot;).dataTable({ &quot;bJQueryUI&quot;: true, &quot;sScrollX&quot;: &quot;100%&quot;, &quot;bFilter&quot;: false, &quot;aLengthMenu&quot;: [[10, 25, 50, -1], [10, 25, 50, &quot;All&quot;]], &quot;iDisplayLength&quot;: 10, &quot;sPaginationType&quot;:&quot;full_numbers&quot; }).columnFilter({ &quot;aoColumns&quot;: [ { type: &quot;text&quot; }, null, null, null, null, null, null ]<pre lang="Javascript"></pre> })</pre>




i have 7 columns,i want to add individual column filter for first column,i dont know where am missing.can anyone suggest


这是关于如何做到这一点的好文章。检查:< br $> b $ b

ASP.NET MVC中的jQuery DataTables高级过滤(jQuery DataTables和ASP.NET MVC集成 - 第五部分) [ ^ ]



我希望这会对你有所帮助。
Here is good article about how to do that.Check this :

jQuery DataTables Advanced Filtering in ASP.NET MVC (jQuery DataTables and ASP.NET MVC Integration - Part V)[^]

I hope this will help to you.


这篇关于如何在jquery数据表中获取单个列过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆