0

日付の開始/終了を移動または変更すると、データベースが更新されますが、ガントに保持されないガント チャートがあります。変更を確認するには、ガントを再読み込みする必要があります。更新イベントを更新後に更新するように拡張する方法はありますか?

$("#gantt_here").kendoGantt({
                            dataSource: {
                                batch: true,
                                transport: {
                                    read: {
                                        url: "http://URL/gantt/<?= $client ?>/<?= $project ?>",
                                        dataType: "json"
                                    },
                                    update: {
                                        url: "http://URL/ganttUpdate/<?= $client ?>/<?= $project ?>",
                                        dataType: "json",
                                        method: "post"
                                    },
                                    create: {
                                        url: "http://URL/<?= $client ?>/<?= $project ?>",
                                        dataType: "json"
                                    },
                                    destroy: {
                                        url: "http://URL/ganttDestroy/<?= $client ?>/<?= $project ?>",
                                        dataType: "json"
                                    },
                                    parameterMap: function (options, operation) {
                                        if (operation !== "read") {
                                            return {models: kendo.stringify(options.models || [options])};
                                        }
                                    }
                                },
                                schema: {
                                    model: {
                                        id: "id",
                                        fields: {
                                            id: {from: "id", type: "number"}, //
                                            orderId: {from: "orderId", type: "number", validation: {required: true}}, //
                                            parentId: {from: "parent", type: "number", validation: {required: true}}, //
                                            start: {from: "start", type: "date"}, //
                                            end: {from: "end", type: "date"}, //
                                            title: {from: "title", defaultValue: "", type: "string"}, //
                                            percentComplete: {from: "percentComplete", type: "number"}, //
                                            client: {from: "client", type: "number", validation: {required: true}}, //
                                            project: {from: "project", type: "string", validation: {required: true}}, //
                                            summary: true,
                                            expanded: true
                                        }
                                    }
                                }
                            }
4

1 に答える 1

0

私が経験していた問題 (KendoUI Web サイトのドキュメントのどこにも言及されていません!) は、更新後に更新されたデータ行を返す必要があることです。これを返すと、その特定の行のリフレッシュが開始され、移動/更新が保持されます

それ以外に変更したのは、読み取りおよび更新時に転送方法を JSON から JSONP に変更したことだけです。

于 2016-06-06T10:23:37.953 に答える