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

Problem with cancel an newly inserted row in grid

2 Answers 254 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Rak asked on 27 Dec 2016, 01:42 AM

Hello, I am struggling with a weird error while canceling a newly inserted row in a grid. Please help.

Below is a simplifed version of my code (

var myGrid = $("#my-table-grid").kendoGrid({
  toolbar: [ {
                    name: "create",
                    text: "Create"
                } ],
  editable: { mode: "inline", confirmation: false },
  columns: [
    { field: "name" },
    { field: "age" },
    { command: [{ name: "edit"}] }
  dataSource: {
    //data: [],
    data: {"a": []},   
    schema: {
      data: "a",
      model: { id: "id",
          fields: {
             id: {type: "number"},
             name: {type : "string"},
             age: {type: "number"},


Steps to reproduce:

1. Click the "Create" button to insert a new row.

2. Fill in any data and click "Update" to save the row.

3. Click the "Create" button to insert a second row.

4. Click "Cancel" button right away without filling in any data in the second row.


The second row will NOT be canceled. Error message "Uncaught TypeError: Cannot read property 'uid' of undefined" is shown in the console.


This issue will not occur for the first row added (You can cancel the first row). Also, if I do not specify the data field in the dataSource section (, it works fine too. In my real case, the data comes from a API call with structured JSON data so this is not an option for me.


I wonder if I misconfigured something or this is a bug. Please help. Thanks a lot in advance.

2 Answers, 1 is accepted

Sort by
Alex Hajigeorgieva
Telerik team
answered on 27 Dec 2016, 08:31 AM
Hi Rak,

Thank you very much for the provided runnable sample.

To enable editing of the Kendo UI Grid, the Data Source should be configured for CRUD operations:

Once, this is done, everything works as expected:

For more demos, you may check out the official demos site, e.g. remote data source CRUD operation with inline editing is available at:

I hope this helps.

Alex Hajigeorgieva
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Top achievements
Rank 1
answered on 30 Dec 2016, 06:47 AM
Thank you so much Alex. This is very helpful!
Asked by
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Top achievements
Rank 1
Share this question