I encountered following problem: I am using custom delete dialog with 3 buttons.
1) When I click "Odregistrovat" the edit dialog appears, I edit the entry, save, everything OK.
2) When I repeat the step 1) after click on "Odregistrovat" the edit dialog appears for only a while and disappears again and again until I refresh the page. Then it works once and for the second and next tries it does not work again.
Do you know how to prevent this behaviour please?
PS: Video with the behaviour (first attempt works, second not) is available under following link: https://ulozto.cz/!bTCTMfnQ3cbD/editpopup-problem-rar
I would like to deliver runable project, but it is quite complex and big. Is it enough to deliver only below attached .cshtml?
With Kind Regards,
7 Answers, 1 is accepted
Also, it would be great if you can assemble a small dojo sample where the issue is replicated. This will enable us to examine the behavior locally and look for its cause.
there are no errors in browser console (printscreen in the link). I attach the solution for you to reproduce the error. I hope it helps.
Thank you for the provided sample. I have investigated it and noticed that in the click event handler function of the custom command x Smazat buttons click event is bound to handlers. In other words, every time the custom command is clicked an event handler is added to each button inside the Kendo Window, which means that when one of those buttons is clicked each handler will execute its logic.
Possible solution is to add a bool flag whether the event handler have already been added
I have modified the provided sample to apply the aforementioned solution.
thank you very much, that solved the problem! I would have one more question.
When creating a new entry I would like to do before-save validation on the server of the entered data and display back a dialog to the user about the result. The dialog should appear in front of the "create new" window.
- If the validation pass the user clicks ok and the data are saved.
- If the validation will not pass, the validation dialog will disappear and the "create new" window will not be closed to prevent entering the already filled values again.
Do you have any suggestions how to solve this problem? Do I have to create window template and do some custom command on create or is it possible to somehow tweak current pre-defined create dialog?
The above attached solution contains pre-defined create method.
Thank you for your help,
I forgot to attach the link to the video.
should I start a new thread for this question?
It is recommended to open a new thread for each unrelated query you may have. This way the information in a thread will be consistent and easier to find and use as reference in the future.
With that said, for the described functionality you can use the Remote Validation feature in the Grid component. Please check out the resources below that illustrate the functionality in more detail.