首页 > 解决方案 > 我如何通过选中的复选框对数据表进行排序

问题描述

app.controller('projetTableController', function($scope,$http,$compile,CRUDService) {

$scope.init = function(){
    CRUDService.init($scope);
    var filtres =   [];
    var columns = [ 
        {mDataProp : 'id',"visible":false,"searchable":false} ,
        {"sWidth": "10px", bSortable: false,searchable:false , orderable: false,"mRender": function(data, type, full) {
            return  '<input type="checkbox"  ng-disabled="mode == \'read\'" ng-checked="checkedP('+full.id+')" ng-click="toggleCheckedP('+full.id+')" />';
        }},
        {mDataProp : 'denomination'}
        ];

    $scope.tableProjet = TableManager.initCompiled("projetTable","/projet/rest/list", columns,filtres,$compile,$scope);
};

});

标签: angularjsspring-bootdatatables

解决方案


                            <div class="row">
                                <div class="col-md-12">
                                    <table id="projetTable"
                                        class="table table-striped table-bordered"
                                        ng-controller="projetTableController"
                                        th:attr="ng-init='init();'">
                                        <thead>
                                            <tr>
                                                <th class="noVis"></th>
                                                <th class="actions noVis"></th>
                                                <th><th:block
                                                        th:text="#{administration.user.projet.list.denomination}"></th:block></th>
                                            </tr>
                                        </thead>
                                    </table>
                                </div>
                             </div>

推荐阅读