1

I have a HTML table which i use to manage using Datatables. Now i'm trying do add some functionalities like adding rows, removing rows and modifying cells. To do that i'm trying to use the "jquery-datatables-editable" plugin. I followed the instructions and it gives me the following error:

TypeError: $(...).DataTable(...).makeEditable is not a function

I've already seen the other questions regarding this problem, but those don't actually solve my error. The order of the imports is ok: jQuery dataTables makeEditable() is not a function And it seems that i don't have the following problems: Jquery Datatable : makeEditable not a function error

Here's my code:

processManager = $('#processManager').DataTable( {
        "ajax": {
            url: "getMultiTables.php",
            type: "POST"
        },
        "rowCallback": function( row, data ) {
            if ( $.inArray(data.DT_RowId, selected) !== -1 ) {
                $(row).addClass('selected');
            }
        },
        "columns": [
                    {
                        "orderable": false,
                // Create an HTML select with all the versions of the data
                //TODO Correggi +01
                "render": function (row, type, val, meta) {
                    //scheduledButtons(val, process);
                    return returnButtons(val)
                    // return  '<button type="button" name="button A" class="btn btn-primary btn-xs" onclick="launchProcess(this)">A</button><button type="button" name="button B" class="btn btn-primary btn-xs" onclick="launchProcess(this)">B</button><button type="button" name="button C" class="btn btn-primary btn-xs" onclick="launchProcess(this)">C</button>';

                }
            },
            {
                "orderable": false,
                // Create an HTML select with all the versions of the data
                //TODO Correggi +01
                "render": function (row, type, val, meta) {
                    return  '<label><input type="checkbox" name="checkBoxA" class="form-control"/>A</label><label><input type="checkbox" name="checkBoxB" class="form-control"/>B</label><label><input type="checkbox" name="checkBoxC" class="form-control"/>C</label><label><input type="checkbox" name="checkBoxConcat" class="form-control"/>Concatenate</label>';}
                },
                { "data": "Process ID" },
                { "data": "Resource" },
                { "data": "Resource Class" },
                { "data": "Category" },
                { "data": "Format" },
                { "data": "Automaticity" },
                { "data": "Process type" },
                { "data": "Access" },
                { "data": "Real Time" },
                { "data": "Source" },
                { "data": "A" },
                { "data": "Status A" },
                { "data": "Time A" },
                // { "data": "Exec A" },
                { "data": "Last Update" },
                { "data": "Error A" },
                { "data": "B" },
                { "data": "Status B" },
                { "data": "Time B" },
                // { "data": "Exec B" },
                { "data": "Error B" },
                { "data": "C" },
                { "data": "Status C" },
                { "data": "Time C" },
                // { "data": "Exec C" },
                { "data": "Last Triples" },
                { "data": "Error C" },
                { "data": "D" },
                { "data": "Status D" },
                { "data": "Time D" },
                // { "data": "Exec D" },
                { "data": "Triples Count" },
                { "data": "Error D" },
                { "data": "E" },
                { "data": "Status E" },
                { "data": "Time E" },
                { "data": "Triples Count Repository" },
                // { "data": "Exec E" },
                { "data": "Error E" },
                { "data": "Period" },
                { "data": "Overtime" },
                { "data": "Parameters" },
                { "data": "Error" },
                { "data": "Description" }
        ],
        "columnDefs": [
            { className: "buttons", "targets": [ 0 ] },
            { className: "checkBoxes", "targets": [ 1 ] },
            { className: "Process ID", "targets": [ 2 ] },
            { className: "Resource", "targets": [ 3 ] },
            { className: "Resource Class", "targets": [ 4 ] },
            { className: "Category", "targets": [ 5 ] },
            { className: "Format", "targets": [ 6 ] },
            { className: "Automaticity", "targets": [ 7 ] },
            { className: "Process type", "targets": [ 8 ] },
            { className: "Access", "targets": [ 9 ] },
            { className: "Real Time", "targets": [ 10 ] },
            { className: "Source", "targets": [ 11 ] },
            { className: "A danger", "targets": [ 12 ] },
            { className: "Status A danger", "targets": [ 13 ] },
            { className: "Time A danger", "targets": [ 14 ] },
            // { className: "Exec A danger", "targets": [ 15 ] },
            { className: "Last Update danger", "targets": [ 15 ] },
            { className: "Error A danger", "targets": [ 16 ] },
            { className: "B active", "targets": [ 17 ] },
            { className: "Status B active", "targets": [ 18 ] },
            { className: "Time B active", "targets": [ 19 ] },
            // { className: "Exec B active", "targets": [ 20 ] },
            { className: "Error B active", "targets": [ 20 ] },
            { className: "C info", "targets": [ 21 ] },
            { className: "Status C info", "targets": [ 22 ] },
            { className: "Time C info", "targets": [ 23 ] },
            // { className: "Exec C info", "targets": [ 24 ] },
            { className: "Last Triples info", "targets": [24 ] },
            { className: "Error C info", "targets": [ 25 ] },
            { className: "D warning", "targets": [ 26 ] },
            { className: "Status D warning", "targets": [ 27 ] },
            { className: "Time D warning", "targets": [ 28 ] },
            // { className: "Exec D warning", "targets": [ 29 ] },
            { className: "Triples Count warning", "targets": [ 29 ] },
            { className: "Error D warning", "targets": [ 30 ] },
            { className: "E success", "targets": [ 31 ] },
            { className: "Status E success", "targets": [ 32 ] },
            { className: "Time E success", "targets": [ 33 ] },
            { className: "Triples Count Repository success", "targets": [ 34 ] },
            // { className: "Exec E success", "targets": [ 34 ] },
            { className: "Error E success", "targets": [ 35 ] },
            { className: "Period", "targets": [ 36 ] },
            { className: "Overtime", "targets": [ 37 ] },
            { className: "Parameters", "targets": [ 38 ] },
            { className: "Error", "targets": [ 39 ] },
            { className: "Description", "targets": [ 40 ] }
            ],
            "language": {
                "decimal": ",",
                "thousands": "."
            },
            "lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
            "order": [[2, 'asc']],
            "pagingType": "full_numbers",
            "processing": true,
            "serverSide": true,
            "stateSave": true

    }).makeEditable();

and here are the imports:

<script src="js/jquery/jquery-1.11.1.min.js"></script>
<script src="js/jquery/jquery-ui-1.11.2/jquery-ui.js" type="text/javascript"></script>
<script src="js/dataTables/jquery.dataTables.min.js"></script>
<script src="js/jquery/jquery.jeditable.js" type="text/javascript"></script>
<script src="js/jquery/jquery.dataTables.editable.js" type="text/javascript"></script>
<script src="js/jquery/jquery-validation-1.13.1/dist/jquery.validate.js" type="text/javascript"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<!--<script src="js/dataTables/jquery-1.10.1.dataTables.min.js"></script> -->
<script src="js/dataTables/dataTables.bootstrap.js"></script>
<script src="js/pageManager.js"></script>
<script>

Does anybody know what could be wrong ?

Community
  • 1
  • 1
giogix
  • 677
  • 1
  • 10
  • 31
  • Are you sure you are not loading datatables core code more than once? If that's the case the editable code might not be loaded in the correct order? – jtheman Dec 03 '14 at 13:50
  • What do you mean with core code ? The imports or the HTML code ? ... the imports are called just once. I'm sure. Could it be something else ? – giogix Dec 03 '14 at 14:26

0 Answers0