Everlive and Kendo UI grid serverGrouping does not work

407 Views Asked by At

I am trying to enable serverGrouping option for the kendo ui grid binded to everlive.

For that purpose I take an examble of everlive binding from here: http://demos.kendoui.com/web/grid/everlive.html

I run this code (just added serverGrouping:true and groupable:true to the code) on that page and receive the follwing error: "Uncaught TypeError: Cannot read property 'length' of undefined"

Is that a bug in grid impimentation or I am doing something wrong?

$("#grid").html("");

var everlive = new Everlive({
    apiKey: "3q4sHgIqESXbpvOp",
    scheme: "http"
});

var dataSource = new kendo.data.DataSource({
    type: "everlive",
    transport: {
        // binding to the Order type in Everlive
        typeName: "Order"
    },
    schema: {
        model: {
            id: "Id",
            fields: {
                // default Everlive fields
                CreatedBy:  { type: "string" },
                CreatedAt:  { type: "date" },
                ModifiedAt: { type: "date" },

                // type fields
                Freight:    { type: "number" },
                OrderDate:  { type: "date" },
                ShipName:   { type: "string" },
                ShipCity:   { type: "string" }
            }
        }
    },
    serverPaging: true,
    pageSize: 20,

    serverSorting: true,
    sort: { field: 'OrderDate', dir: 'asc' },

    serverGrouping: true
});

$("#grid").kendoGrid({
    dataSource: dataSource,
    height: 430,
    sortable: true,
    pageable: true,
    groupable: true,
    columns: [
        {
            field: "Freight",
            width: 100
        }, {
            field: "OrderDate",
            title: "Order Date",
            width: 120,
            format: "{0:MM/dd/yyyy}"
        }, {
            field: "ShipName",
            title: "Ship Name"
        }, {
            field: "ShipCity",
            title: "Ship City",
            width: 150
        }
    ]
});
1

There are 1 best solutions below

1
On

ServerGrouping is clearly not supported by the Everlive backend. It is noted what is supported here.