Newly added row disappears if you click edit and cancel.

6 posts, 0 answers
  1. Chris
    Chris avatar
    1 posts
    Member since:
    Oct 2016

    Posted 04 May 2017 Link to this post

    This occurs in the sample in the docs, regardless of the backend.

    Follow this link to the documentation, and open in Dojo.
    http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-edit

    Repro steps:
    Add a new row
    Click edit on new row, then click cancel.
    Row disappears from grid.

    If you do the same on a previously existing row, it does NOT disappear.

  2. Georgi
    Admin
    Georgi avatar
    676 posts

    Posted 05 May 2017 Link to this post

    Hi Chris,

    The example you are looking at is using some hardcoded static data. When you cancel the edit command the Grid rebinds to that same static data.

    However, in a real-world scenario when Grid is configured for CRUD operations the editing is working as expected. 

    Please examine the demo below that illustrates editing in the Grid component.



    Regards,
    Georgi
    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.
  3. Corey
    Corey avatar
    2 posts
    Member since:
    May 2016

    Posted 05 May 2017 in reply to Georgi Link to this post

    Georgi - 

    I see that the demo you linked does in fact work correctly, however, that is not representative of our implementation.  We are doing serverside filtering and paging.

    The difference behavior appears to be related to the fact that upon successful save, the newly added item is not made 'pristine'.  In the provided demo, the page size of 20 is respected after save, but in our serverside implementation, a new page request is not made and therefore the page actually contains 21 items.  Editing & canceling any of the original page items works properly and editing & canceling the newly created item causes it to drop out of the view.  A page reload, or likely forcing a page requery, would bring the newly created item back into play (this time as a 'pristine' item) and it no longer disappears on edit & cancel.

  4. Georgi
    Admin
    Georgi avatar
    676 posts

    Posted 09 May 2017 Link to this post

    Hello Chris,

    The paging in the popup editing example from my previous post is also performed on the server. You can check that for yourself by opening developer tools (F12) in the browser and navigating to the Network tab. You will notice that only the items for the current page are returned from the server.

    With that said, it would be hard to pinpoint what is causing the behavior you are observing. Would you send us a runnable sample where the issue is reproduced? This way we can examine the code and look for what is causing the behavior.

    I am looking forward to your reply.


    Regards,
    Georgi
    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.
  5. Corey
    Corey avatar
    2 posts
    Member since:
    May 2016

    Posted 09 May 2017 in reply to Georgi Link to this post

    We will work on putting together a running example.  

    However, I believe you misunderstood my previous comment, I was pointing out that the page size is not respected after a save in our implementation.  I assumed that the example provided above was doing a 'page data' request after the save, but that is not what I found...

    Reviewing the network tab,  I see the following behavior:

    Load: Products?callback=jQuery...

    Save: Create?callback=jQuery...

    However, after 'Create' I don't see a new 'Products' request, so I have to assume that the grid internally drops an item off of the page to compensate for the newly saved item.

    Our implementation does not seem to behave that way, we seem to have 21 items after the 'create'.

     

  6. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2483 posts

    Posted 11 May 2017 Link to this post

    Hello Corey,


    It would be hard to pinpoint what is causing the behavior you are observing without further investigation. Please take your time in assembling the sample project. 

    This will enable us to debug the code and look for what is causing the behavior. 


    Regards,
    Viktor Tachev
    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