Open its-veejay opened 7 years ago
Hi, i added a class on button and then
$(document).on("click", ".btnDelete", function () {
if (!confirm('Are you sure?')) {
event.preventDefault();
}
//delete
});
Note: i edited the code, so it's not tested.
Were you able to get it working?
cols.Add("Delete").WithHtmlEncoding(false) .WithSorting(false) .WithHeaderText("Delete")
.WithValueExpression((p, c) => { if (p.isApproved == 3) { return String.Format("{2}","return confirm(\'Are you sure you wish to delete this story?\');", "/MvcPWy/Freelancer/Deleteb20EnglishStory/" + p.ID, "Delete");
} else { return ""; } });