Kendo UI Grid HTML5 - 详细信息模板不会保存

时间:2016-08-16 18:08:26

标签: php mysql html5 kendo-grid

这是主网格

    $(document).ready(function() {
        $("#grid").kendoGrid({
            height: 800,
            sortable: true,
            pageable: true,
            selectable: "row",
            filterable: {
                mode: "row"
            },
            editable: { //disables the deletion functionality
                update: false,
                destroy: false
            },
            scrollable: true,
            groupable: true,
            pageable: {
                pageSizes: [10, 25, 50, 100],
                refresh: true,
                buttonCount: 5

这是子网格,当我单击“保存”按钮时,它永远不会对服务器进行POST。是否有一个错误我必须为POST做一个事件?

     function detailInit(e) {
            // get a reference to the current row being initialized
            var detailRow = e.detailRow;

            detailRow.find(".subgrid").kendoGrid({
                dataSource: {
                    transport: {
                        read: "./data/getDetails.php",
                        update: {
                            url: "./data/getDetails.php",
                            type: "POST"
                         }
                    },
                    schema: {
                        data: "data"
                    },
                    serverFiltering: true,
                    filter: {field: "candidate_id", operator: "eq", value: e.data.candidate_id}
                },
                sortable: true,
                pageable: true,
                selectable: "row",
                height:300,
                pageable: {
                    pageSizes: 5,
                    refresh: true,
                    buttonCount: 5
                },

                //rowTemplate: kendo.template($("#rowTemplate").html()),
                columns: [

                    {title: "Task", field: "ARS",width: "100px",filterable: {
                        cell: {
                            showOperators: false
                        }
                    }},
                    {title: "Score", field: "Value",width: "250px"},
                    {  showOperators: false}
                ],
                detailInit: detailInit,
                editable: true,
                navigable: true,
                toolbar: [ "save", "cancel" ]

            });
        }

    });

后端在php中用于fetech查询,我想进行更新。它不起作用。

POSTMAN与API正在运行

0 个答案:

没有答案