error edito.datables
error edito.datables
dpapini
Posts: 13Questions: 4Answers: 0
hi. i recive this error when i try to use the fileds definition
dataTables.editor.min.js:683 Uncaught TypeError: f[E4n] is not a function
my javascript code is the follow
var editor; $(document).ready(function () { //editor definition editor = new $.fn.dataTable.Editor({ ajax: { create: { type: 'POST', url: App.getGlobalWcfPath() +"CreateRole", dataType: "jsonp", }, edit: { type: 'POST', url: App.getGlobalWcfPath() +"UpdateRole", dataType: "jsonp", }, remove: { type: 'POST', url: App.getGlobalWcfPath() +"DeleteRole", dataType: "jsonp", } }, table:"#tableRole", //idSrc:'id', fields: [ { label: "ID" , name: "id" }, { label: "Text" , name: "text" }, ] }); //datatable definition $('#tableRole').dataTable({ dom: 'Bfrtip', ajax:{ type: "POST", data: function ( d ) { d.myKey = "myValue"; }, url: App.getGlobalWcfPath() +"GetRole", contentType: "application/json; charset=utf-8", dataType: "jsonp", dataSrc: function(result){ var parseJson = $.parseJSON(result.Data); result.draw = parseJson.draw; result.recordsTotal = parseJson.recordsTotal; result.recordsFiltered = parseJson.recordsFiltered; result.data =parseJson.data; return result.data; } }, serverSide:true, processing:true, ordering :true, paging :true, searching :true, order: [[ 0, 'asc' ]], columns: [ {"data":"id", "title":"Identificativo", "class":"center", "orderable":"true", }, {"data":"text", "title":"Testo", "class":"left", "orderable":"false", }, ], select: true, buttons: [ { extend: "create" , editor: editor , className: "btn btn-circle btn-icon-only btn-default" , text:"" }, { extend: "edit" , editor: editor , className: "btn btn-circle btn-icon-only btn-default" , text:"" }, { extend: "remove" , editor: editor , className: "btn btn-circle btn-icon-only btn-default" , text:"" } ], preDrawCallback: function (oSettings) { $(this).find('tbody').hide(); return true; }, drawCallback: function (oSettings) { $(this).find('tbody').show("fast", function () { $('#loadRole').hide(); $('#loader-wrapper').hide(); }); }, }); $("#tableRole"+"_wrapper").addClass('actions'); $('.dt-buttons').attr("style", "margin-top:-60px !important") editor.on('onInitEdit', function () { editor.show(); } ); });My html code is the follow
Nessun risultato |
thank you in advance
This discussion has been closed.
Replies
You probably need to verify the order you are loading the jquery and datatables libraries.
Kevin
Hi,
Your Editor trial has expired. It should actually show an error message stating that fact, but there was a period a little while ago when that wasn't working, and it looks like your trial was one of them I'm afraid.
If you would like you continue using Editor, a license can be purchased here.
Allan