从Angular DataTable中的JQuery ColumnFilterWidget插件中隐藏/删除额外的下拉小部



基本上我正在尝试在这里实现2件事。我正在此处使用ColumnFilterWidget.js jQuery DataTable插件进行列过滤。我在"排除"一个额外的下拉列表时遇到了一些问题,即第六个<td>,并且具有整个数据表内容html。当前不包括第六列正在删除所有数据,并显示一个空数据表

这是我的html:

<table datatable="ng" dt-options="dtOptions"
    dt-instance="dtInstanceCallback" style="width: 100%" id="quoteMgmt">
    <thead>
        <tr>
            <th>Customer</th>
            <th>Origin City</th>
            <th>Origin State</th>
            <th>Destination City</th>
            <th>Destination State</th>
            <th></th> 
       </tr>
    </thead>
    <tbody>
        <tr ng-repeat="quote in mgmtQuote track by quote.quoteNumber">
            <td style="display: none">
                {{ quote.customerInfoVo.customerName }}</td>
            <td style="display: none">
                {{ quote.eqmCommonInfo.origCity }}</td>
            <td style="display: none">
                {{ quote.eqmCommonInfo.origState }}</td>
            <td style="display: none">
                {{ quote.eqmCommonInfo.destCity }}</td>
            <td style="display: none">
                {{ quote.eqmCommonInfo.destState }}</td>    
            <td>
                <div class="row">
                    <div class="seven columns">
                    [Datatable Content]

这是我的app.js

 $scope.dtOptions = DTOptionsBuilder.newOptions()
                .withOption('sDom', 'ltip')
                .withOption('iDisplayLength', 25)
                .withOption('fnDrawCallback',function(oSettings){$(oSettings.nTHead).hide();SpinnerService.hide();})
                .withOption('aaSorting',[])
                .withLanguage({"sEmptyTable":"No quotes available"})
                .withOption("sDom", 'W<"clear">lfrtip')
                .withOption('aoColumnDefs',[{
                    'bVisible':true,'aTargets':[0,1,2,3,4]
                }])
                .withOption('aoColumnDefs',[{
                    'bVisible':false,'aTargets':[5]
                }]);

我可以通过不同的语法来修复它。在使用Angular DataTable dtoptionsbuilder时,语法应几乎不小心。在我的答案中发布我是否对某人有帮助。

   $scope.dtOptions = DTOptionsBuilder.newOptions()
                .withOption('iDisplayLength', 25)
                .withOption('fnDrawCallback',function(oSettings){$(oSettings.nTHead).hide();SpinnerService.hide();})
                .withOption('aaSorting',[])
                .withOption('bJQueryUI',false)
                .withOption('bDeferRender',true)
                .withLanguage({"sEmptyTable":"No quotes available"})
                .withOption("sPaginationType",'full_numbers')
                .withOption('sDom', 'W<"clear">lrtip')
                .withOption("aoColumns",[
                   /*0 Customer */         {"bVisible":false},
                   /*1 Origin City */      {"bVisible":false},
                   /*2 Origin State */     {"bVisible":false},
                   /*3 Desination City */  {"bVisible":false},
                   /*4 Desination State */ {"bVisible":false},
                   /*5 Equipment Type */   {"bVisible":false},
                   /*6 Entire Datatable */ {"bVisible":true},
                   /*7 Sent Date */        {"bVisible":false},
                   /*8 Expiration Date */  {"bVisible":false},
                   /*9 Awarded Date */     {"bVisible":false},
                   /*10 Awarded Date desc*/{"bVisible":false}
                 ])
                 .withOption("oColumnFilterWidgets",{
                      "aiExclude":[6,7,8,9,10],
                      "sSeparator": "\s*/+\s*",
                      "bGroupTerms": false,
                 })