kendo ui - Appending a new row in kendoUI gives TypeError: Cannot read property 'replace' of undefined -


I had to add a new line to a condo grid below when I pressed a button, but I have a template column One of the templates gets an error, in which "property can not be read" instead of 'undefined'.

Here is the code that I am trying to use for the above operation:

  var data source = grid.dataSource; Var total = dataSource.data () Length; DataSource.insert (total, {}); DataSource.page (dataSource.totalPages ()); Grid.editRow (grid.tbody.children () last ().);  

I need the new grid in editable mode. Any kind of help please

I believe that 'replaced' is one of your data items Is the area? During grid build you have to define all new line default values:

  $ ("# grid"). Candugid ({Data Source: {Data: Data, Schema: {Model: {fields: {Replace: {defaultValue: "Your Value",}}}}} ...});  

Or when you enter the new line:

  dataSource.insert (total, {change: "your value"});  

Comments