grid datasource type oData

5 posts, 1 answers
  1. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 15 Feb 2013 Link to this post

    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
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 18 Feb 2013 Link to this post

    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!
  3. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 19 Feb 2013 Link to this post

    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
  4. Answer
    Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 19 Feb 2013 Link to this post

    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!
  5. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 19 Feb 2013 Link to this post

    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.



Back to Top