I have an issue with records being deleted before a RadConfirm window pops up. I am calling the RadConfirm serverside based on whether my string id is null or not. Why are my records deleting before the pop up and not waiting for it to be confirmed? I have also tried putting the methods in the else block but same thing happens. I need the RadConfirm to popup before the records get deleted and delete the records if the user clicks ok on the RadConfirm.
I have found this link Confirm Before Executing Codebehind but its only basing it on confirming, as you can see by my code I am calling the RadAlert if they try deleting with nothing selected.
if (ids == null)
{
RadWindowManager1.RadAlert("No selected records to delete.", 330, 180, "No Records", "alertCallBackFn");
}
else
{
RadWindowManager1.RadConfirm("", "refreshGrid", 300, 300, null, "My Confirm", "alertCallBackFn");
}
dal.DeleteBankStatements(ids);
RadGrid2.Rebind();