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

second radwindow showing behind first when the first is maximized

5 Answers 84 Views
Window
This is a migrated thread and some comments may be shown as answers.
Leonardo Amorim de Barros
Top achievements
Rank 1
Leonardo Amorim de Barros asked on 09 Feb 2009, 06:43 PM
I want to open a radwindow from another radwindow. The problem occurs in this situation:

I hava maximized the former radwindow, after that, i try to open another radwindow, despite i set the modal to true, and active to true, the second form opens behind the first one. I don't know why this happens. The problem doesn't occurs if the form is restored.

thanks,

Leonardo.

5 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 12 Feb 2009, 02:47 PM
Hello Leonardo,

By default, if the RadWindow control is maximized it appears above all HTML elements on the page and this behavior cannot be changed. What I can suggest in scenario like yours is:
  • if you open the WindowB from maximized WindowA
    • attach a function to the OnClientClose event of the WindowB
    • in this function maximize the WindowA ( because it was restored in the next steps)
    • after minimal timeout restore the WindowA, then set modal behavior of the WindowB
    • if you close the WindowB the WindowA will be maximized ( OnClientClose event was fired )
  • if you open the WindowB from not maximized WindowA - you simply need tp set desired behavior of the WindowB after some timeout.
For your convenience I attached a simple project to this thread that demonstrates the described approach.

I hope this helps.

Kind regards,
Fiko
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Leonardo Amorim de Barros
Top achievements
Rank 1
answered on 12 Feb 2009, 07:24 PM
Hi Fiko,

I downloaded your example, created a project, set the default.aspx as start page, included the reference of telerik and ran the example.

I clicked on the "button", then another window was opened, after that, i maximized the window (Popup.aspx) and clicked on "New Button Modal", an error appears, which message was:



Run-time error in Microsoft JScript: Sys.ArgumentTypeException: Object of type 'Object' cannot be converted to type 'Function'.
Parameter name: handler

the error occurs in this method: 

Function.createDelegate =

function Function$createDelegate(instance, method) {

 

0
Fiko
Telerik team
answered on 16 Feb 2009, 11:48 AM
Hello Leonardo,

This problem could appear if your web.config is not configured to use ASP.NET AJAX. For convenience I attached my configuration file (.Net 3.5) - please add it in the project that I previously sent and let me know how this goes.


Greetings,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Leonardo Amorim de Barros
Top achievements
Rank 1
answered on 16 Feb 2009, 07:06 PM
Hi Fiko,

I looked to the code you sent me, and i noticed that was a similiar way that i did, but i didn't want to resize the window. But i think it is the only way, or i can hide the button maximize.

thanks
0
Fiko
Telerik team
answered on 19 Feb 2009, 08:46 AM
Hello Leonardo,

Yes, if you remove  the "Maximize" button from the RadWindow control, then you do not need the provided workaround. However if you need to have a maximized RadWindow, you should use the approach that I described before.



Kind regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
Leonardo Amorim de Barros
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Leonardo Amorim de Barros
Top achievements
Rank 1
Share this question
or