In Cell Editing, but Inline Editing when adding record

2 posts, 0 answers
  1. Ken
    Ken avatar
    6 posts
    Member since:
    Aug 2015

    Posted 06 Jan 2017 Link to this post

    Here's an example of what I'm working with: http://dojo.telerik.com/uYidA/7

    I'm making a grid that is using autoSync and in cell editing for updating rows and allowing the rows to be reordered with kendo sortable as well.

    The issue I'm running into is whenever you try to add a new record I'm getting this error "Uncaught TypeError: Cannot read property 'closest' of undefined" which is due to autoSync trying to find a row that isn't currently there yet.

    What I'm wondering is if there's a way to add a row using the edit/update/delete whenever I'm using batch and in cell editing?

    Basically I'm wanting to be able to update rows with in cell editing using autoSync to save as you go, but whenever you add a new record to use inline editing so that I'm not creating a blank record in the database and then updating that blank record?

    Let me know if that makes sense! I know it's a little confusing

    Thanks!

  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2026 posts

    Posted 10 Jan 2017 Link to this post

    Hello Ken,

    Indeed at the time when the change event of the Kendo UI DataSource is fired with action "sync" the new row is not available in the grid's table. Maybe a flag should be used in order to determine whether a new row is added to the grid and open the cell in edit from the dataBound event handler for example. 

    Regards,
    Boyan Dimitrov
    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 visualization (charts) and form elements.
Back to Top