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

Error when I click in cancel button in grid with inline

0 Answers 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Juan
Top achievements
Rank 1
Juan asked on 29 Mar 2012, 03:05 PM
Hi, I have a grid with inline option, and when I edit a row, a later I click in cancel button, the data in row selected is changed.

The grid is:
                    $("#grid").kendoGrid({
                        dataSource: sharedDataSource,
                        toolbar: [ { "create", text: "Add new Prodduct Group" }],
                        editable: "inline", 
                        change: onChange,
                        selectable: true,
                        height: 400,
                        sortable: true,
                        pageable: true,
                        columns: [
                                { field: "strProdGroupDesc", title: "Product Group", nullable: false, filterable: false },
                                { command: ["edit"], title: " ", width: "110px" }
                        ]
                    })

                    function onChange(arg) {
                        var grid = this;
                        grid.select().each(function() {
                            var dataItem = grid.dataItem($(this));
                            PGDesc = dataItem.strProdGroupDesc;
                            PGId = dataItem.intProdGroupId;
                            alert("Item: " + PGId + "-" + PGDesc);
                        });
                    }

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Juan
Top achievements
Rank 1
Share this question
or