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

Grid operations does not reach the server

1 Answer 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cristiano
Top achievements
Rank 1
Cristiano asked on 13 Jul 2016, 12:51 PM

Hi all!

 

I have a simple grid which is initially empty (I have autoBind false) and I fill it afterwards with the following:

grid.setDataSource(values);
grid.dataSource.read();

 

 

 

this is working fine so far, and the grid reflects the data. The issue comes when trying to do some server-side operation, like sorting or editing data. When I click on the 'Save Changes' button, or try to sort on column, nothing happens, the controller is not reached. What am I doing wrong? Here is my grid:

$(this.sharpID).kendoGrid({
    dataSource: {
        transport: {  
            read: {
                url: "training/Read",
                dataType: "jsonp"
            },                            
            update: {
                url: "training/Update",
                dataType: "jsonp"                                   
            },
            destroy: {
                url: "/training/Destroy",
                dataType: "jsonp"
            },
            create: {
                url: "/training/Create",
                dataType: "jsonp"
            }
        },
        batch: true,
        schema: {
           model: {     
              id: "ITEM",                             
              fields: {
                  "ITEM": { editable: true },
                  "AREA": { editable: false },
                  "YEAR": { editable: false },
                  "MONTH": { editable: false },
                  "DAY": { editable: false },
                  "QTY": { editable: true }
               }
           }
       }
    },
    editable: true,                       
    autoBind: false,                               
    columns: structure.columns,  
    toolbar: ["save","cancel"],         
    sortable: {
        mode: "multiple"
    },                                     
});

 

 

Thanks in advance.

grid.setDataSource(values);
grid.dataSource.read();

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 15 Jul 2016, 08:29 AM

Hello Cristiano,

In the provided configuration the server operations are not enabled. In this case all operations such as sorting. filtering and etc will be handled on the client and no request to the server will be initiated. Please refer to the  Kendo UI DataSource API to see how to enable server operations. 

Regards,
Boyan Dimitrov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Cristiano
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or