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

RadManagerWindow modal behaviour

7 Answers 87 Views
Window
This is a migrated thread and some comments may be shown as answers.
David Rodriguez
Top achievements
Rank 1
David Rodriguez asked on 31 Mar 2011, 04:23 PM

Hi,
We
 must ask the user about an operation during the process of the main thread. We currently use msgbox, depending on user response to make a decision or another.
We have updated RadControl from a previous version to the brand new version of the Telerik suite (2011.1.315.35) and we have seen that there is a new control that can reproduce the same action.

We
 would like to use Radwindows, radalert, etc, so that we can give our own style, keeping a similar CSS style of the application. The problem facing us is that through vb code for this control we must wait an answer from the user (like modal behaviour in WinFomrs).
We have done several test to make this behaviour possible.
We´ve seen that the RadWindow control appears after the code of the function finish instead of showing at the momment is being calledt.

is this a normal behaviour?.
Are we doing a bad implementation of the control?.

Kind regards.


7 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 05 Apr 2011, 04:28 PM
Hello David,

I am afraid I could not completely understand you. At first you say that  "The problem facing us is that through vb code for this control we must wait an answer from the user (like modal behaviour in WinFomrs)."  and I understand it as the RadWindow closes before the user has answered.

However, below you say that "We´ve seen that the RadWindow control appears after the code of the function finish instead of showing at the momment is being calledt." which I understand as it should be fatsre and not to wait.

This being said, in order to be able to help I will need some more detailed explanations and sample code or live url along with detailed reproduction instructions. Once I receive this I will get a better understanding on the setup and the problem and I will do my best to help.

Greetings,
Svetlina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
David Rodriguez
Top achievements
Rank 1
answered on 05 Apr 2011, 05:28 PM
Hello Svetlina,
Thanks for your support.
According to your answer I´m afraid I didn´t write properly.
What I would like to say is that when we invoke the RadWindowManager, the window appears once it has completed the code where the function is invoked. This is very bad for us because we need to get the values ​​that gives us the control  which interacts with the user and performs tasks with those values​​.
I guess it's a bad implementation on our part we would like to know how it works but really this control.
We´ll send you some code example to show you exactly what we are doing


Thank you very much indeed
Greetings
0
Svetlina Anati
Telerik team
answered on 08 Apr 2011, 08:13 AM
Hello David,

I will really need some runnable sample code and reproduction steps to better understand the issue.

meanwhile I prepared for you the following notes which might be useful:

1) If the problem is that the RadWindow immediately disappears, make sure that you do not make a postback when opening - e.g return false if you open it from a button and if a postback is needed - initiate it through the built in js __doPostBack function later, when needed.

2) If the problem is that you can't get the values back, use either OnClientClose for standard RadWindow or a callback function for predefined dialogs.

Once I receive you code and I get a better understanding on what is actually going on, I will fix the sample code and you will be then able to apply the same fix in your original application.
 

Greetings,
Svetlina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
David Rodriguez
Top achievements
Rank 1
answered on 08 Apr 2011, 08:43 AM
Hello Svetlina,
I completely
agree with your proposal.
On Monday you will have the code ready.Meanwhile we´ll try to apply your comments.

Thank you very much for the support given.
You will receive a feedback next Monday.

Kind regards
0
Svetlina Anati
Telerik team
answered on 13 Apr 2011, 08:46 AM
Hello David,

Take your time preparing the sample demo, just make sure that is fully runnable and provide very detailed steps with explanations about the actual and desired result on each step. Once I receive this I will do my best to help. 

Best wishes,
Svetlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
David Rodriguez
Top achievements
Rank 1
answered on 11 May 2011, 12:29 PM
Hi Svetlina,
After making a deep search in forums and code examples we have found some of our needs.
But we have now one more doubt. We try to explain you below:
We have one function called MyFuntion with this code (this is just an example).In this example, Redirection to the another web page is executed after the user accepts de MsgBox.

Public Sub MyFunction()
MsgBox("My custom message")
Redirect("Another web page")
End Sub



But using Telerik RadWindowManager :
Public Sub MyFunction()
radwindowmanager.RadAlert("My custom message",100,100,"My Custom Tittle",Nothing)
Redirect("Another web page")
End Sub

The behaviour with Telerik Controls is that the redirection to the another page is executed before RadAlert appears. So we have seen that RadAlert is never executed.

Svetlina, we would like to get the First behaviour instead of the second using RadWindowManager using Vb code in server side.

Hope this could help
Thanks in advance
Kind Regards
0
Marin Bratanov
Telerik team
answered on 13 May 2011, 11:49 AM

Hi David,

The RadAlert, RadPrompt and RadConfirm dialog windows are actualy modal RadWindows and are thus client-side objects.This means that they operate through JavaScript, which cannot block the execution thread similar to the way message box class does in the code-behind.

What I can suggest is that you use the RadAlert's callback function to redirect the browser by using the window.location object. You can see the callback functions in action in the following Online Demo: http://demos.telerik.com/aspnet-ajax/window/examples/browserdialogboxes/defaultvb.aspx.

Depending on your needs you might need to output the callback function (or at least a parameter for it - the URL, if it is changed depending on your custom logic) from the server side. For that purpose you can use the ScriptManager's - RegisterStartUpScript()   method for example.



Greetings,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Window
Asked by
David Rodriguez
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
David Rodriguez
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or