0

I want to start with I looked at this question and I am using the correct constructor.

I get this error when I am running my code:

$(...).dataTable(...).columnFilter is not a function

html:

<table class="table table-striped" id="activeProjects">
    <thead>
        <tr>
            <th>Project Name</th>
            <th>Project Number</th>
            <th>Manager</th>
            <th>Architect</th>
        </tr>
    </thead>
    <tbody>

    </tbody>
    <tfoot>
        <tr>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
        </tr>
    </tfoot>
</table>

<script>
    $(document).ready(function () {

        var table =  $('#activeProjects').dataTable({
            "processing": true,
            "serverSide": true,
            "ajax": {
                "url": "../api/Project/GetAll/",
                "dataSrc": ""
            },

            "columns": [
                { "data": "ProjectName" },
                { "data": "ProjectNumber" },
                { "data": "ProjectManager" },
                { "data": "ProjectArchitect" }
            ]
        }).columnFilter({
            aoColumns: [ { type: "text" },
                         { type: "text" },
                         { type: "text" },
                         { type: "text" }
            ]

        });
    });
</script>
Community
  • 1
  • 1
Robert
  • 4,306
  • 11
  • 45
  • 95

0 Answers0