3 Answers, 1 is accepted
0
Hi Bertha,
We have a how-to that illustrates how the behavior you describe can be implemented. Check it out below and let me know how it works for you.
Regards,
Viktor Tachev
Progress Telerik
We have a how-to that illustrates how the behavior you describe can be implemented. Check it out below and let me know how it works for you.
Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
James
Top achievements
Rank 1
answered on 29 Apr 2020, 10:07 PM
As of Kendo UI 2019-ish, the above example breaks the popup editor cancel button.
0
Hi James,
Thank you for reporting the behavior to us. In order to close the popup with the Cancel button after update I would suggest the change below. The code closing the popup is added in the edit event handler.
edit: function (e) {
var editWindow = this.editable.element.data("kendoWindow");
editWindow.unbind("close");
editWindow.bind("close", onWindowEditClose);
$(".k-grid-cancel").one("mousedown", function (e) {
preventCloseOnSave = false;
editWindow.close();
});
},
Check out the updated dojo below for reference:
https://dojo.telerik.com/UTOsUNAQ
Regards,
Viktor Tachev
Progress Telerik
Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Our thoughts here at Progress are with those affected by the outbreak.
George
commented on 10 Aug 2022, 06:16 PM
Top achievements
Rank 1
Using the provided dojo if you hit the "Add New Record" button. Then hit "Cancel". The Add New Record button becomes unusable. I am trying to use this in my project but that bug makes it pretty unusable. I'm having trouble finding a work around. Any suggestions?
Viktor Tachev
commented on 12 Aug 2022, 07:51 AM
Telerik team
Thank you for bringing this to our attention. There was a JavaScript error that prevented the code from executing. In order to avoid it you can use the following definition of the edit event handler:
edit: function (e) {
var editWindow = e.container.data("kendoWindow");
editWindow.unbind("close");
editWindow.bind("close", onWindowEditClose);
$(".k-grid-cancel").one("mousedown", function (e) {
preventCloseOnSave = false;
editWindow.close();
});
},
An updated version of the dojo is available below:
https://dojo.telerik.com/UTOsUNAQ/16
I have also fixed the code in the documentation and it should be live soon.