1

私はこのトピックを読み、剣道 Web のオープン ソース版を使用しています。現在のバージョンは Kendo UI Web v2012.3.1114 です。私の問題は上記のリンクのように存在し、解決できませんでした。

私のスクリプトの一部はここにあります:

function load() {                
            var grid = $("#grid").data("kendoGrid");

            if (grid) {
                //destroy the previous Grid instance
                grid.destroy();
                //clean up the html
                grid.wrapper.html("");
            }
            var crudServiceBaseUrl = "WebForm.aspx",
                //datasource = null;
                dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: crudServiceBaseUrl + "?q=load&sql=" + $("#tbSQL").val(),
                        dataType: "jsonp"
                    },
                    update: {
                        url: crudServiceBaseUrl + "?q=update&sql=" + $("#tbSQL").val(),
                        dataType: "jsonp"
                    },
                    destroy: {
                        url: crudServiceBaseUrl + "?q=destroy&sql=" + $("#tbSQL").val(),
                        dataType: "jsonp"
                    },
                    create: {
                        url: crudServiceBaseUrl + "?q=create&sql=" + $("#tbSQL").val(),
                        dataType: "jsonp"
                    },
                    parameterMap: function (options, operation) {
                        if (operation !== "read" && options.models) {
                            return { models: kendo.stringify(options.models) };
                        }
                    }
                },
                batch: true,
                pageSize: 20,
                schema: getmodel()
            $("#grid").kendoGrid({
                dataSource: dataSource,
                navigatable: true,
                //pageable: true,
                selectable: true,
                //groupable: true,
                sortable: true,
                pageable: {
                    refresh: true,
                    pageSizes: true
                },
                height: 500,
                toolbar: ["create", "save", "cancel"],
                columns: getColumns(),
                editable: true
            });
        }

すべて問題ありませんが、ページをロードした後でのみ、ヘッダーで一度だけグループ化できます。

例

4

1 に答える 1

0

この動作は、KendoUI 2012 Q3 SP1 (v.2012.3.1315) の最新バージョンで改善され、グループ化が期待どおりに機能しているようです。便宜上、このサンプルを作成しました。

于 2013-01-26T11:19:19.817 に答える