This is a migrated thread and some comments may be shown as answers.

problem datasource with serverGrouping and grid

4 Answers 405 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Mathieu
Top achievements
Rank 1
Mathieu asked on 13 Jun 2012, 06:52 AM
Hello,

I have a problem to work the serverGrouping in my datasource and the kendo grid (download my project). 

this is my json result request : 

{"data":[{"toto":2,"name":"la valeur de i0"},{"toto":2,"name":"la valeur de i1"}],"count":1,"groups":[{"field":"toto","value":"2","items":[{"toto":2,"name":"la valeur de i0"},{"toto":2,"name":"la valeur de i1"}],"hasSubgroups":false,"aggragates":{}}]}


and this my javascript : 

var source = new kendo.data.DataSource({
            type: "jsonp",
            transport: {
                read: "Home/GetResult"
            },
            schema: {
                groups: "groups",
                total: "count",
                model: {
                    fields: {
                        toto: { type: "number" },
                        name: { type: "string" }
                    }
                },
                data: "result"
            },
            serverGrouping: true
        });
 
        $(document).ready(function () {
            $("#grid").kendoGrid({
                dataSource: source,
                height: 250,
                groupable: true,
                columns: [{
                    field: "toto",
                    title: "toto",
                    width: 100
                },
                {
                    field: "name",
                    title: "name",
                    width: 100
                }
            ]
            });
        });


but I have an error => SCRIPT5007: Unable to get value of the property 'length': object is null or undefined 

what's wrong with my kendo grid or my configuration ?

Thank you

4 Answers, 1 is accepted

Sort by
0
Tonny
Top achievements
Rank 1
answered on 24 Aug 2012, 02:08 PM
I have the same issue here. Were you able to resolve this?

Thanks in advance!
0
Mathieu
Top achievements
Rank 1
answered on 24 Aug 2012, 02:14 PM
Hello,

yes, in fact, I did not need the jsonp. 

I use the json and it's ok.

I hope that it will be able to help you,

Mathieu
0
Pandiyarajan
Top achievements
Rank 1
answered on 11 Apr 2013, 05:06 PM
Hi Mathieu,

I have a problem with the serverGrouping. Can you share the project? 

Pandian
0
Lakshmi
Top achievements
Rank 1
answered on 27 Sep 2013, 04:24 PM
I have the same problem too. How did you resolve it
Tags
Data Source
Asked by
Mathieu
Top achievements
Rank 1
Answers by
Tonny
Top achievements
Rank 1
Mathieu
Top achievements
Rank 1
Pandiyarajan
Top achievements
Rank 1
Lakshmi
Top achievements
Rank 1
Share this question
or