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

RadConfirm not displaying

2 Answers 274 Views
Window
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 26 Mar 2012, 11:53 PM
I'm trying to use RADConfirm for the first time calling it from my codebehind.
I'm using Q1 of RadControls, .Net 4.0, VS 2010.

I have a web form with a button on it. In a function called by the button click event, I put the following:
            RadWindowManager1.RadConfirm("Are you sure?", "confirmCallBackFn", 300, 100, null, "Delete all messages?");

On the page I have a asp:ScriptManager, a telerik:RadAjaxManager, and a telerik:RadWindowManager.

In the debugger I can see the line with the RADConfirm does get executed but I never see anything pop up in the browser. Am I making a rookie mistake? Please enlighten me.

Also, once I can get it to show up, what gets returned? True or False, yes? Could I do something like:

if (RadWindowManager1.RadConfirm("Are you sure?", "confirmCallBackFn", 300, 100, null, "Delete all messages?"))
{
   //delete the messages
}

Thanks!
Matt

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 28 Mar 2012, 12:46 PM
Hello Matt,

Please look for JavaScript errors on your page that can be preventing the radconfirm from executing properly. For example, a missing callback function can throw an error. Please try to resolve it and if you are unable post some runnable code that can replicate it so we can help you. You may also find useful this article for future use of the server method.

Please also check for some global CSS rules or class overrides that may be interfering with the RadWindow. This is easiest done by removing all your custom CSS from the page and if the issue is gone then you can easily find the offending rule by re-adding them one by one.

As for the return type and handling the user input - please examine this article: http://www.telerik.com/help/aspnet-ajax/window-dialogs-confirm.html. It explains that the result is returned in the callback function as a parameter and that it depends on the clicked button (true, false and null for the ok, cancel and [x] respectively). You can also see it in action in this online demo: http://demos.telerik.com/aspnet-ajax/window/examples/browserdialogboxes/defaultcs.aspx.

To transfer this to the server you can either invoke an AJAX request through the RadAjaxManager, or use the __doPostBack() function to either click on a hidden button (which one may depend on the value) that will execute the needed server-side mehod, or you can store the user response in a hidden field and look for it in the PageLoad server event.


Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
lalit
Top achievements
Rank 1
answered on 10 Feb 2014, 12:19 PM
check you are using RadWindowManager on aspx page or not
Tags
Window
Asked by
Matt
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
lalit
Top achievements
Rank 1
Share this question
or