Before bootbox, I did this on aspx file in gridview;
<asp:Button ID="btnDelete" CssClass="btn btn-danger" OnClientClick="if(!confirmDelete()) return false;" runat="server" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" CausesValidation="false" CommandName="DeleteRow" Text="Delete"/>
and on js file;
function confirmDelete() {
return confirm("Are you sure you want to delete the record?"); }
And with confirmation, the gridview's RowCommand is triggered and the deletion is done.
With bootbox, I am realy stuck. I know bootbox is asynchronus and try to use 'preventDefault', but it didn't work. So how can I convert the above js file to bootbox version? Thanks in advance.
I finally come up with this solution;
And changing button's OnClientClick;