Enable confirmation popup for create/edit as well

2 posts, 0 answers
  1. Andy
    Andy avatar
    22 posts
    Member since:
    Feb 2016

    Posted 23 Feb 2016 Link to this post

    1. Currently, the grid shows a confirmation alert when you want to delete a row. Is there a way to get this alert on creation and on update as well?

    2. Is there a way to disable the "Ignore future alerts from this page" option (a checkbox when the alert appears)? I don't want users to check it and thus being able to bypass confirmation.

  2. Marin
    Admin
    Marin avatar
    1057 posts

    Posted 25 Feb 2016 Link to this post

    Hi,

    1. You can handle the edit event of the grid and manually add code there to show confirmation for each specific button and handle the result:
    $("#grid").kendoGrid({
                //.....
                edit: function (e) {
                    $(e.container).find(".k-grid-update").click(
                        function () {
                            var res = confirm("update item"); //or custom confirmation instead of the built-in one
                            if (!res) {
                                event.preventDefault();
                                return false
                            }
                        })
                }
            });

    2. The "ignore future alerts from this page" option is a browser feature and kendo does not have control over this. If the browser provides any settings or configuration to disable it then it can be done manually for each browser, otherwise you can use custom confirmation box and decide what buttons and checkboxes to put in there. An example of this can be found here: http://docs.telerik.com/kendo-ui/controls/layout/window/how-to/confirmation-dialog-promise

    Regards,
    Marin
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top