Jquery Datatable : makeEditable not a function error

空扰寡人 提交于 2019-12-31 07:21:52

问题


This is the code I have, but it errors on firebug saying $("#updateTable").dataTable({bServerSide: true, sAjaxSource: "UpdateTS", bProcessing: true, aoColumns: [{sName: "ID"}, {sName: "Result"}]}).makeEditable is not a function

<link href="../../Content/CSS/demo_table_jui.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jQuery-1.4.4.min.js" type="text/javascript"></script>
<script src="../../Scripts/jQuery.dataTables.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.jeditable.js" type="text/javascript" />
<script src="../../Scripts/jquery.dataTables.editable.js" type="text/javascript" />
<script src="../../Scripts/jquery-ui.js" type="text/javascript" />
<script src="../../Scripts/jquery.validate.js"  type="text/javascript" ></script>
<script language="javascript" type="text/javascript">
       $(document).ready(function () {

       $('#updateTable').dataTable({
               "bServerSide": true,
               "sAjaxSource": "UpdateTS",
               "bProcessing": true,
               "aoColumns": [
                   { "sName": "ID" },
                   { "sName": "Result" }
               ]
           }).makeEditable();
   });

</script>

This error is causing the datatable not editable. Am I not using editable plug-in right?

The makeEditable function is defined in the plug-in ../../Scripts/jquery.dataTables.editable.js


回答1:


Have you tried changing your script include for that library to:

<script src="../../Scripts/jquery.dataTables.editable.js" type="text/javascript" ></script>

instead of

<script src="../../Scripts/jquery.dataTables.editable.js" type="text/javascript" />

It looks like a few other libraries you are using might have this same issue.



来源:https://stackoverflow.com/questions/7907111/jquery-datatable-makeeditable-not-a-function-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!