Warn user before losing edit changes (in-line)

5 posts, 1 answers
  1. Jazmin
    Jazmin  avatar
    1 posts
    Member since:
    Jul 2016

    Posted 24 Oct 2016 Link to this post


    We are using Kendo version 2016.2.714. And when you click edit, make some changes and then click edit from another row, you will lose your changes without a confirmation. How can we achieve this confirmation? If possible, it should include when the user clicks another page, or when the user clicks to add a new row (These events makes you lose your in-line edit changes without confirmation).

    Also, the simpler the better, as we have to implement this in various places where we use the grid widget.

    Thanks in advance!

  2. Maurice
    Maurice avatar
    40 posts
    Member since:
    Jan 2016

    Posted 25 Oct 2016 in reply to Jazmin Link to this post

    maybe not the answer you wnated but this is the way I do it.

    .DataSource(datasource => datasource
           .AutoSync(enabled: true)


    Now every change will be synced to the server.




  3. Answer
    Viktor Tachev
    Viktor Tachev avatar
    2500 posts

    Posted 26 Oct 2016 Link to this post

    Hello Jazmin,

    I have replied to your query in the support ticket you have submitted. Please submit any additional queries you have there.

    For anyone looking for similar functionality, below is a sample that outlines how you can prompt the user before editing a new record.

    Viktor Tachev
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  4. Katharine
    Katharine avatar
    3 posts
    Member since:
    Feb 2016

    Posted 10 Oct 2017 in reply to Viktor Tachev Link to this post

    What is the support ticket number?  I would like more information about when the user clicks another page, or when the user clicks to add a new row having a warning message for lost data.  Any direction to information would be greatly appreciated. The warning when another row is edited works great!
  5. Viktor Tachev
    Viktor Tachev avatar
    2500 posts

    Posted 12 Oct 2017 Link to this post

    Hello Katharine,

    The tickets are visible only to the person or company that submitted them. However, the solution in the ticket is identical to the one in this post. 

    With that said, if you would like to use the same warning when the insert button is clicked you can change the target selector a bit. Check out the modified dojo below that illustrates the approach:

    Regarding your other query- if you would like to alert the users that they will lose unsaved changes when closing the page I would recommend handling the onUnload event. In the handler you can check if there are any pending changes in the Grid and if necessary alert the user.

    Viktor Tachev
    Progress Telerik
    Try our brand new, jQuery-free Angular 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