This is a migrated thread and some comments may be shown as answers.

Enable confirmation popup for create/edit as well

1 Answer 624 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 23 Feb 2016, 08:44 PM

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.

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 25 Feb 2016, 12:09 PM
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!
 
Tags
Grid
Asked by
Andy
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or