kendo-ui - 语法错误 : Unexpected token ILLEGAL

标签 kendo-ui syntax-error

在我的项目中,我想在通过单击“按钮”清除剑道网格的同时显示弹出窗口,但我收到 SyntaxError: Unexpected token ILLEGAL error occurred in browser debug
这是我的代码:

function Filter() {
     $("#loading-msg").data("kendoWindow").center().open();
            $("form.k-filter-menu button[type='reset']").trigger("click");
    $("#loading-msg").data("kendoWindow").center().close();
}

我错在哪里?为什么我收到这个错误?

My fiddle.

最佳答案

而不是在发出过滤器后立即执行关闭。我的建议是关闭 DataSource requestEnd 事件的窗口。

即:清除过滤器:

function clearFiter() {
    $("#loading-msg").data("kendoWindow").center().open();
    $("#grid").data("kendoGrid").dataSource.filter([]);
}

和数据源:
dataSource: {

    type: "odata",
    transport: {
        read: "http://demos.kendoui.com/service/Northwind.svc/Orders"
    },
    schema: {
        model: {
            fields: {
                OrderID: { type: "number" },
                Freight: { type: "number" },
                ShipName: { type: "string" },
                OrderDate: { type: "date" },
                ShipCity: { type: "string" }
            }
        }
    },
    pageSize: 10,
    serverPaging: true,
    serverFiltering: true,
    serverSorting: true,
    requestEnd : function () {
        $("#loading-msg").data("kendoWindow").close();
    }
},

您在此处修改的代码:http://jsfiddle.net/OnaBai/MG89G/595/

关于kendo-ui - 语法错误 : Unexpected token ILLEGAL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15564083/

相关文章:

javascript - 剑道网格不显示在弹出窗口中

java - token "class"上的语法错误

arrays - 错误: Getting “non-static variable … cannot be referenced” when trying to fill and array with random numbers

python - 在Python中导入nltk包时出现问题

syntax-error - 标准ML中的LPAREN语法错误

javascript - 设置图表中 X 轴间隔的格式 - Kendo UI

javascript - 如何在 Kendo-UI 网格中创建单独的列模板

javascript - Kendo UI Editor - 更改字体颜色选择器和背景颜色选择器的默认颜色

javascript - 剑道网格: How to create perform some taks on Add new row and not on Edit

date - VBScript中的Excel.Find函数出现错误