Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82314

Error occurs plz solve..

$
0
0

I'm trying to implement CRUD operation using datatableseditor using Backbone, RequireJS and Datatables.But I'm getting the error message:

$.fn.dataTable.Editor is not a constructor":
why it occurs..what is the reason???

Here is my code...
var editor;
$(document).ready(function () {
editor = new $.fn.dataTable.Editor({
ajax: "/View/GetList",
table: "#sellertable",
fields: [{
label: "SELLER CODE:",
name: "Sellercode"
}, {
label: "EMAIL:",
name: "Email"
}, {
label: "MOBILE:",
name: "Mobile"
}, {
label: "ISACTIVE:",
name: "Isactive"
}

            ]
        });

        $('#sellertable').DataTable({

            ajax: {
               url: "/View/GetList",
                type: "POST",
                datatype: "json"
            },
            serverSide: true,
            columns: [
                { data:"Sellercode"},
                { data: "Email"  },
               { data: "Mobile" },
                { data: "Isactive" }

            ],
            select: true,

            buttons: [
                { extend: "create", editor: editor },
                { extend: "edit", editor: editor },
                { extend: "remove", editor: editor }
            ]
        });
    });

Viewing all articles
Browse latest Browse all 82314

Trending Articles