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

RadConfirm.. how to use it ?

1 Answer 171 Views
Window
This is a migrated thread and some comments may be shown as answers.
mac
Top achievements
Rank 1
mac asked on 29 Aug 2008, 04:33 PM

hi. looked at the sample page here . http://demos.telerik.com/aspnet/prometheus/Window/Examples/BrowserDialogBoxes/DefaultVB.aspx .
don't get it. well... I get it just not in how to use it for my issue.
Simple issue. confirm record deletion from a formview.
the setup.
container.aspx has radwindowmanager and radajaxmanager (controls the radtabstrip and radmultipage). Rad multipage has my ascx grid/form pages
within myform.ascx I have a formview / editItemTemplate.

    <asp:Button ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" 
            Text="Delete" OnClientClick="radconfirm('Are you certain you want to delete this?');return false; "></asp:Button> 
    </EditItemTemplate> 

The issue.
the radconfirm raises the confrm dialoge, however, clicking OK does not result in record deletion. If I remove return false;  it deletes the record regardless of the button clicked.
What am i doing wrong ? Do I need to trap the confirmation back in JS? And if so, how do i tell page to proceed with the deletion? Sorry if this is a stupid question.. I just don't understand how to get this to work.

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 01 Sep 2008, 02:02 PM
Hi Mac,

Yes, the returned argument from the radconfirm (it is returned in the CallbackFunction) must be sent to the server after that.
This (sending arguments from the client to the server with JavaScript) is a general task - for example you can use __doPostBack() or RadAjax's ajaxRequest call to do this.

I hope this helps.


Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
mac
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or