- Home
- Forum
- ASP.NET Web Forms
- Confirm dialog before delete SQL record.
Confirm dialog before delete SQL record.
Hi Peter,
Thanks for using Syncfusion Products.
We are glad to let you know that we can achieve your requirement “Confirm Dialog before Delete” by using “ShowDeleteConfirmDialog” property of Grid EditSettings. Please refer the following code snippets.
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" OnServerEditRow="EditEvents_ServerEditRow" OnServerAddRow="EditEvents_ServerAddRow" OnServerDeleteRow="EditEvents_ServerDeleteRow"> <EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True" ShowDeleteConfirmDialog="true"></EditSettings> </ej:Grid> |
For your convenience we have created a sample and the same can be downloaded from below location.
Sample: http://www.syncfusion.com/downloads/support/forum/118515/Sample-952039100.zip
Also please refer the following API documentation for further reference.
http://help.syncfusion.com/UG/JS_CR/ejGrid.html#editSettings-%3EshowDeleteConfirmDialog
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
Hi Peter,
Thanks for the update.
We are sorry to let you know that we are unable to reproduce the issue “Visual Studio does not respond when we set ‘ShowDeleteConfirmDialog’ as true”. We suspect that the Visual Studio Add-ins are the cause of the issue. Please refer the below general solutions to resolve the crash.
- Remove add-ins from the visual studio and restart the application will be prevent the visual studio crash.
- Repair the Visual Studio from the control panel will reset the application.
Please refer the below links to know further details about this.
https://msdn.microsoft.com/en-us/library/aa983433(v=vs.90).aspx
If your application still crash in your end after tried the above solutions, please get back to us with more information regarding your reported issue or else please provide us the video demonstration. It will be helpful for us to sort out the issue and provide youthe solution as soon as possible.
Please let us know if you have any concerns.
Regards,
Alan Sangeeth S
<ClientSideEvents ActionComplete="complete" EndAdd="endAdd" EndDelete="endDelete" EndEdit="endEdit" ActionBegin="begin" />
</style>
<script type="text/javascript">
function endAdd(args) {
$("#OrdersGrid").ejWaitingPopup("show");
}
function endDelete(args) {
$("#OrdersGrid").ejWaitingPopup("show");
}
function endEdit(args) {
$("#OrdersGrid").ejWaitingPopup("show");
}
function complete(args) {
if (args.requestType == "refresh") {
$("#OrdersGrid").ejWaitingPopup("hide");
}
}
function begin(args) {
if (args.requestType == "delete") {
if (confirm("Are you sure, you want to delete the record?") == false) {
args.cancel = true;
}
}
}
</script>
Thanks for the update.
We are happy to hear that you have resolved your issue using a workaround.
But we are deeply regret to let you know that we are unable to reproduce the issue “Visual Studio does not respond when we set ‘ShowDeleteConfirmDialog’ as true” in our end.
The Add-ins must be the problem in your end. So please repair or re-installyour Visual Studio to get it working properly.
Regards,
Alan Sangeeth S
- 5 Replies
- 2 Participants
-
PE peterV
- Mar 16, 2015 07:52 AM UTC
- Mar 23, 2015 12:45 PM UTC