This is a migrated thread and some comments may be shown as answers.
Help with data source
1 Answer 61 Views
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 25 Feb 2012, 03:33 AM

I'm stuck with a data source and a grid. The data is to be shown in a grid but I can't get it too work.

<div id="grid"></div>
 
            <script>
                $(document).ready(function() {
 
            var d={"count":0,"subTotal":0,"items":{"sku":"dvdwinf","title":"Doctor Who:
 
Inferno","price":19.95,"format":"DVD","url":"drwho/doctor-who-inferno/dvdwinf","quantity":1}}
 
 
                    $("#grid").kendoGrid({
                        dataSource: {
                            data: d,
                            pageSize: 10
                        },
            schema: {
                   data: "items"
                    },
                        height: 250,
                        scrollable: true,
                        sortable: true,
                        pageable: true,
                        columns: [
                            {
                                field: "sku",
                                title: "First Name"
                            },
                            {
                                field: "title"
                            }
                        ]
                    });
                });
            </script>

The data to show will be a from a web service but for now it is hot-wired in there for testing. The JSON object is properly formatted and the EXACT data is used with a jQuery AJAX request elsewhere and used just fine. Any ideas?

1 Answer, 1 is accepted

Sort by
0
Gabriel
Top achievements
Rank 1
answered on 29 Feb 2012, 01:41 AM
Anyone? Telerik?
Asked by
Gabriel
Top achievements
Rank 1
Answers by
Gabriel
Top achievements
Rank 1
Share this question
or