This is a migrated thread and some comments may be shown as answers.

Delete with confirmation in listview?

1 Answer 75 Views
ListView
This is a migrated thread and some comments may be shown as answers.
DH
Top achievements
Rank 1
DH asked on 29 Sep 2015, 07:25 PM

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>

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 30 Sep 2015, 07:01 AM

Hello,

The following demo shows how you can do this with RadConfirm: http://demos.telerik.com/aspnet-ajax/window/examples/confirmserverclicks/defaultcs.aspx.

Regards,

Marin Bratanov
Telerik
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
Tags
ListView
Asked by
DH
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or