Basic Datasource Binding Question/Issue

2 posts, 0 answers
  1. JAMES
    JAMES avatar
    1 posts
    Member since:
    Sep 2011

    Posted 28 Sep 2016 Link to this post

    Brand new to the KendoUI grid tool. Some of the other developers on my team have this working, but they are building the datasource and grid as variables and then using jQuery to associate these values to the grid. I'm trying to learn the basics and build it in JSP from scratch. I think I've more or less duplicated their grid settings. The problem I'm having is that when setting "data : data" in the schema, the grid doesn't popup at all. If I take that line out, the grid shows up but no data gets populated in the grid. 

    I was hoping someone can look over this code and tell me where I'm going wrong. At the least, what does it mean when the grid doesn't popup at all when setting "data : data"?


    <div id="tableGrid">
    <div id="grid"></div>
    var dataSource = new{
    transport : {
    read : {
    type : "POST",
    contentType: "application/json",
                           url: "/This URL should work because it works elsewhere"
    parameterMap : function(options, operation) {
    return JSON.stringify(options);
    schema : {
    data : data,
    type : "json",
    model : {
    fields : {
    Field1: { type: "number"}
    serverFiltering : true,
    serverGrouping : true,
    serverSorting : true,
    serverPaging : true,
    pageSize : 10


     dataSource: dataSource,
     pageable: true,

  2. Alex Hajigeorgieva
    Alex Hajigeorgieva avatar
    625 posts

    Posted 30 Sep 2016 Link to this post

    Hi James,

    The Kendo UI Data Source schema data may be necessary to retrieve the server response. It depends on the structure of the response whether this configuration will be required. We expect to see the name of the property which contains an array of the data:

    Example configuration of the schema based on the response:
    // server response:
    {foo: [1,2,3]}
     data: "foo"

    Kind Regards,
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top