Jquery Datatable:makeEditable 不是函数错误

发布于 2024-12-11 19:17:36 字数 1549 浏览 1 评论 0原文

这是我的代码,但在 firebug 上出错,说 $("#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>

此错误导致数据表不可编辑。难道我没有使用可编辑插件吗?

makeEditable 函数在插件中定义 ../../Scripts/jquery.dataTables.editable.js

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

讽刺将军 2024-12-18 19:17:36

您是否尝试过将该库的脚本包含更改为:

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

而不是

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

它看起来您正在使用的其他一些库可能也有同样的问题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文