SOURCE

console 命令行工具 X clear

                    
>
console
$(document).ready(function () {
    $("#grid").kendoGrid({
        dataSource: {
            type: "odata",
            transport: {
                read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders"
            },
            schema: {
                model: {
                    fields: {
                        OrderID: { type: "number" },
                        ShipCountry: { type: "string" },
                        ShipName: { type: "string" },
                        ShipCity: { type: "string" },
                        ShipAddress: { type: "string" }
                    }
                }
            },
            pageSize: 30
        },
        height: 540,
        pageable: true,
        columns: [{
            field: "OrderID",
            title: "Order ID",
            width: 160,
            command: [{
                name: "edit",
                template: " <a class='k-grid-edit k-button'>编辑</a>",
                click: function (e) {
                    alert(1)
                }
            }, {
                name: "delete",
                template: function () {
                    return "<a class='k-grid-delete k-button'>删除</a>"
                },
                click: function (e) {
                    download()
                }
            }]

        }, {
            field: "ShipCountry",
            title: "Ship Country",
            width: 300
        }, {
            field: "ShipCity",
            title: "Ship City",
            width: 300
        }, {
            field: "ShipName",
            title: "Ship Name",
            width: 300
        }, {
            field: "ShipAddress",
            lockable: false,
            width: 400
        },
        ]
    });
    function download() {
        alert(2)
    }
});
 <div id="grid"></div>