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

bug in Grid save method

4 Answers 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 1
Ivan asked on 12 Apr 2012, 09:40 AM
Hi
$("#grid").kendoGrid({
    columns: [
        {field: "Id", title: "№"},
        {field: "Text", title: "Text"}
    ],
    dataSource: {
        data: [
            {"Id":"4","Text":"hi"},
            {"Id":"7","Text":"word"}
        ],
        schema: {
            model: {
                id: "Id",
                fields: {
                    Id: {editable: false, validation: {required: true}},
                    Text: {nullable: true}
                }
            }
        }
    },
    scrollable: false,
    sortable: true,
    filterable: true,
    editable: true,
    save: function(e) {
        console.log(e);
    }
}).data("kendoGrid");
If to edit the first row, then the second one, then the first one again, save method is called several times while editing the last time

4 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 12 Apr 2012, 11:30 AM
Hello Ivan,

Indeed the save event will be triggered whenever the editor is about to close, i.e every time the cell is blurred.

All the best,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ivan
Top achievements
Rank 1
answered on 13 Apr 2012, 02:42 AM
Hello Nikolay

once edited - once was called, the second time edited - two times were caused the third time - three times, and should be after each editing - once call

You tried to execute my code ?

Николай, вы по русски понимаете ?
0
Ivan
Top achievements
Rank 1
answered on 16 Apr 2012, 02:46 AM
Hello Nikolay

in kendo.web.js version v2012.1.322
Patch:
line 26819
            that.options.model.bind("set", $.proxy(that._validate, that));
it is necessary to replace on
            that.options.model.one("set", $.proxy(that._validate, that));
0
Rosen
Telerik team
answered on 17 Apr 2012, 02:16 PM
Hi Ivan,

I was able to observe the behavior you have described. However, we have addressed it and the fix will be included in the next release. I have also updated your telerik points.

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