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

datasource problem

0 Answers 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 05 Dec 2011, 09:26 PM
data     [ { ProductTypeId="1558", name="Apparel"}, Object { ProductTypeId="1554", name="Bottlecap Clips"}, Object { ProductTypeId="1550", name="Bows"}, etc...]

This is how my json is coming back.  How should I format the datasource?  I can't figure out to write the schema.  Do I need a schema?

 $("#grid").kendoGrid({
                        dataSource: {
                            type: "odata",
                            transport: {
                                read: "data.cfm"
                            },
                            schema: {
                                data: {
                                        producyTypeId: { type: "number" },
                                        siteId: { type: "number" }
                                }
                            },
                            pageSize: 10,
                            serverPaging: true,
                            serverFiltering: true,
                            serverSorting: true
                        },
                        height: 250,
                        filterable: true,
                        sortable: true,
                        pageable: true,
                        columns: [{
                                title:"ID",
                                field:"producyTypeId",
                                filterable: false
                            },
                            "name"
                        ]
                    });

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Dennis
Top achievements
Rank 1
Share this question
or