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

Kendo UI Grid saveRow method doesn`t sync data and doesn`t close the row

3 Answers 209 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Casufi
Top achievements
Rank 1
Casufi asked on 24 Jan 2014, 01:52 PM
Here is the [updated Fiddle][1] to test.
I am trying to setup grid with the in-line editing. Why saveRow method doesn`t affect update function in transport definition and doesn`t exit row from edit mode ?

Also please try to change var "can_edit" to false; Why this option doesn`t affect the field "day1"


  [1]: http://jsfiddle.net/Casufi/zK489/18/

3 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 28 Jan 2014, 09:47 AM
Hello Casufi,

Thank you for providing a jsFiddle sample. The problem is caused by the way dataSource's transport methods are defined.

If the read transport is set to a function, then all the other transport methods should be set to a functions as well. It is not supported to have a 'read' defined as a function and 'update' defined as a object.

For your convenience I updated your example:
transport: {
    read: function (options) {
        options.success(local_data);
    },
    update: function(options) {
        console.log("update");
        options.success();
    }
},


Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Casufi
Top achievements
Rank 1
answered on 28 Jan 2014, 10:36 AM
I am using both transports with URL in the real script. I found the solution already, the service that used to post update data should return an array with the updated row.

There is another bug. Please try to set can_edit = false and doble click any row.
0
Accepted
Alexander Valchev
Telerik team
answered on 30 Jan 2014, 09:51 AM
Hi Casufi,

Although that the editable is set to false you are trying to edit the Grid programatically through the editRow method. This is a not supported scenario.
When the can_edit flag is set to false the double click event should not be delegated at all.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Casufi
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Casufi
Top achievements
Rank 1
Share this question
or