3

Kendo UI Grid に問題があります。(json データ形式を返す非同期要求から) データをロードすると、グリッドはグリッドのフッターを正しくレンダリングしません。クリックしてグリッドを順序付けまたはページングすると、正常にレンダリングされます。私の質問は次のとおりです。このバグを修正するにはどうすればよいですか?

画像を見てください。

最初のロード:

ここに画像の説明を入力

コードで並べ替えた後、フッターは問題ないように見えます。

ここに画像の説明を入力

このバグを修正して共有する方法を誰かが知っていれば、本当に感謝しています。

ありがとうございました。

クライアント側コード (Kendo バージョン: v2012.3.1114)

<script>

    var grid;

    $(document).ready(function () {
        var serviceUrl = "@Url.Action("GetAsyncData", "Home")";

        grid = $("#grid").kendoGrid({
            dataSource: {
                type: "json",
                transport: {
                    read: {
                        dataType: "json",
                        url: serviceUrl,
                        cache: false
                    }
                },
                schema: {
                    data: "data",
                    total: "count",
                    model: {
                        id: "Id"
                    }
                }               
            },
            height: 400,
            toolbar: [{ text: "New", className: "add-button" }],
            groupable: true,
            sortable: true,
            pageable: false,
            selectable: true,
            resizable: true,
            columns: [
                {
                    field: "Code",
                    title: "Cód.",
                    width: "150px",
                    filterable: true,
                    groupable: false,
                    sortable: true,
                    resizable: true
                },
                {
                    field: "Name",
                    title: "Nome",
                    filterable: true,
                    groupable: false,
                    sortable: true,
                    resizable: true
                }, {
                    field: "Contact",
                    title: "Contato",
                    encoded: false,
                    filterable: true,
                    groupable: true,
                    sortable: true,
                    resizable: true
                },
                { command: { name: "Editar", text: "", className: "edit-button custom-button edit" }, title: "", width: "50px", filterable: false, sortable: false, groupable: false, resizable: false },
                { command: { name: "Detalhes", text: "", className: "detail-button custom-button detail" }, title: "", width: "50px", filterable: false, sortable: false, groupable: false, resizable: false },
                { command: { name: "Excluir", text: "", className: "delete-button custom-button delete" }, title: "", width: "50px", filterable: false, sortable: false, groupable: false, resizable: false }
            ]
        }).data("kendoGrid");

        $("#grid").delegate(".add-button", "click", function (e) {
            window.location = '@Url.Action("Create")';
        });
    });

</script>

<div id="grid"></div>
4

1 に答える 1

-3

使用している剣道のバージョンは何ですか? Q3 バージョンを使用して動作を再現できません

于 2012-12-17T07:09:02.163 に答える