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

JSON format with objects

0 Answers 147 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
OM
Top achievements
Rank 1
OM asked on 05 Mar 2012, 05:53 PM
Hi,
Does the Kendo datasource support the following JSON format?

var people = [
                        {
                            "Person": { Name: "Person 1"},
                            "Person": { Name : "Person 2"}
                        }
                    ];

My current schema only loads the last record from the data source when connected to a grid. I am using the Q1'12 beta.

$("#grid").kendoGrid({
                        dataSource: {
                          data: people,
                            schema: {                                
                                type : "json",    
                                model: {                                    
                                    fields: {
                                        Name: { type: "string" }
                                    }
                                }
                            }                            
                        },
                        height: 250,
                       
                        columns: [
                            {
                                field: "Person.Name",
                                title: "Name"
                            }
                            
                        ]
                    });


Thanks.
Morten

No answers yet. Maybe you can help?

Tags
Data Source
Asked by
OM
Top achievements
Rank 1
Share this question
or