majid_shoorabi
majid_shoorabi

Reputation: 129

kendo ui Grid virtual scrolling - where is the scroll?

When using virtual scrolling kendo-ui grid there is no visible scroll.

I'm using virtual scrolling in manner to show some records from DataBase but I don't see any scroll in my grid and it displays just six first rows.

I can't understand where is my problem.

This is my code:

  $("#cargoGrid").kendoGrid({
    dataSource: {
        serverPaging: true,
        serverSorting: true,
        pageSize: 20,
        transport: {
            read: {
                url: "/frmPermission/api/readAllCargo",
                type: "POST",
                contentType: "application/json",
                dataType: "json",
            },
            parameterMap: function (options) {
                return JSON.stringify(options);
            }
        },
        schema: {
            data: "data",
            total: "total",
            model: {
                fields: {
                    cargoId: {
                        type: "number"
                    },
                    title: {
                        type: "string"
                    },
                }
            }
        },
    },
    scrollable: {
        virtual: true
    },
    pageable: {
        numeric: false,
        previousNext: false,
        messages: {
            display: "تعداد {2} رکورد نمایش داده شده است",
            empty: "اطلاعاتی برای نمایش وجود ندارد"
        }
    },
    columns: [
        {field: "cargoId", title: "Id", hidden: true},
        {field: "title", title: "نوع بار"},
        {
            filed: "",
            title: "انتخاب",
            template: "<button class='select k-button' onclick=\"clickSelectCargo( #=cargoId# , '#=title#' )\">انتخاب</button>",
            width: "200px"
        }
    ],
    selectable: "single",
    // sortable: true
});

I found when I use "sortable: true," and I clicked on header column it worked but before click dosen't display Virtual scrolling

Upvotes: 1

Views: 2176

Answers (1)

Ajay Jangra
Ajay Jangra

Reputation: 174

scrollable: {
   endless: true
},

Upvotes: 2

Related Questions