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

grid datasource type oData

4 Answers 581 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 15 Feb 2013, 07:45 AM
Hello,
what type is oData,how is formated the data?and what other types can be for grid datasource?
can i see somewhere a description of all grid parameters what they does?

i used oData type,and get from the server with GetProductList mvc action in json format the data,and nothing is happening,the grid is not filled.
the grid definition is like that
$(document).ready(function () {
                    var grid = $("#grid").kendoGrid({
                        dataSource: {
                            type: "odata",
                            transport: {
                                read: "/Controls/GetProductList"
                            },
                            pageSize: 15,
                            serverPaging: true,
                            serverSorting: true,
                            serverFiltering: true
                        },
                        toolbar: kendo.template($("#template").html()),
                        height: 450,
                        sortable: true,
                        pageable: true,
                        columns: [
                            { field: "ProductID", width: 100 },
                            { field: "ProductName", title: "Product Name" },
                            { field: "UnitPrice", title: "Unit Price", width: 100 },
                            { field: "QuantityPerUnit", title: "Quantity Per Unit" }
                        ]
                    });

Best Regards,
Daniel

4 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 18 Feb 2013, 01:57 PM
Hi Daniel,


Basically the type configuration option of the DataSource loads transport with preconfigured settings and currently supports only the odata type. For more information about the odata type I would suggest to check the OData documentation.

For more information about the available grid configuration options you can check it's API.

Also I would suggest to use the KendoUI Grid for ASP.NET MVC HtmlHelper instead of KendoUI Grid for Web .

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Daniel
Top achievements
Rank 1
answered on 19 Feb 2013, 07:52 AM
this way,doesn't work the grid?declared in javascript and get data from server via mvc?
because i still do not understand i'm not causing any dependency,all i do,is send some data from the server in json format.
Any way,the bottom line is that i want to implement the example of toolbar template from the web demos,and because my data is not coming from that web service that you use,i did my own data source, returning via MVC action in json format.all i want is to make that example work.what are the solutions?


Best Regards,
Daniel
0
Accepted
Vladimir Iliev
Telerik team
answered on 19 Feb 2013, 10:24 AM
HI Daniel,

 
For convenience I prepared small demo of KendoUI for ASP.NET MVC Grid with toolbar template and attached it to the current thread.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Daniel
Top achievements
Rank 1
answered on 19 Feb 2013, 01:07 PM
ok, now i undestand,with javascript is oData and webservices
with mvc,is mvc style.i want it,to be more client-side,only the data get it from the server.
usually with jquery and mvc,i used to mix the things depending on where the value came from,and still working.

Thank you very much for the example.



Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or