Delete with confirmation in listview?

2 posts, 0 answers
  1. DH
    DH avatar
    11 posts
    Member since:
    Dec 2011

    Posted 29 Sep 2015 Link to this post

    I'm having a hard time to use the delete function of listview with a custom javascript delete confirmation. 

    What I'd like to do is use the bootstrap modals, such that onClientClick will trigger a modal, prompting the user to confirm or cancel. I can't quite figure out how to wire up the modal to the linkbutton to return true\false to the link button while breaking the postback. Has anyone done something similar? 


    Current code:

    <asp:LinkButton ID="lnkDeleteQuote" runat="server" Text="Delete" CommandName="Delete" OnClientClick="if(!confirm('Are you sure you want to delete this?')) return false;"></asp:LinkButton>

  2. Marin Bratanov
    Marin Bratanov avatar
    4489 posts

    Posted 30 Sep 2015 Link to this post


    The following demo shows how you can do this with RadConfirm:


    Marin Bratanov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top