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

Modal=True Offsetting Window

4 Answers 102 Views
Window
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 2
Joe asked on 27 Mar 2008, 01:46 PM
Hi,
I'm trying to open a RadWindow in the center of the users screen while "disabling" everything behind the window, until the window closes. Setting Modal="true" almost does the trick, but the window is then offset to the right and down. Or it is posistioning itself based on the item clicked. Either way, it's not centered in the browser window.

Should I be using something other than Modal? I never need more than one window open at a time.
Also, my RadWindows are different sizes so it seems that hardcoding an offset won't always work.... but I could be wrong.

Thanks for any suggestions,
Joe

4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 27 Mar 2008, 03:25 PM
Hi Joe Hakooz,

Are you by any chance using HTML DOCTYPE? This could be a reason for such behavior.
Basically if you have set Modal to true, the RadWindow should be automatically centered on the page - you can check the behavior of the control in our online demos:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Window/Examples/DialogReturnValue/DefaultCS.aspx



Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Joe
Top achievements
Rank 2
answered on 27 Mar 2008, 04:04 PM
Thanks for the reply...

I removed the HTML DOCTYPE from the page that loads into RadWindow, like your example, but it didn't change anything.

I noticed that in your example, the width and height are set in the <telerik:radwindow> tag. I send width and height as a JS variable to the RadWindowOpen JS function.

Could that be the problem?

Thanks again
0
Georgi Tunev
Telerik team
answered on 27 Mar 2008, 04:52 PM
Hello Joe,

I see that I have missed an important piece of information in my previous reply - I apologize for that. 

The Prometheus suite of controls, of which RadWindow is a part, is built on top of MS AJAX framework.
The framework has been developed by Microsoft and is "pushing" for using more standards-compliant web pages - such as the default provided by VS 2005  XHTML 1.0 Transitional.

The MS AJAX methods that set position and size are not functioning properly in IE with DOCTYPE HTML 4.0.
We are aware of the problem, and it has been logged as one requiring work around to be developed. In the beginning of the next week, we released a "Futures" version of RadControls Prometheus where we made some changes in the Prometheus core. These changes might improve the situation on your side and we invite you to try the update - it is available in the Downloads section of RadControls Prometheus in your Client.net account.

Please let us know if the update doesn't help. This problem is logged in our database and we will continue our work in order to provide you with the same experience under DOCTYPE HTML 4.0.



Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Joe
Top achievements
Rank 2
answered on 29 Mar 2008, 05:46 PM
Thanks Georgi for your response.

I was able to find a very simple solution... Since I'm using client-side to launch my window, I just had to add the line...
 oWindow.center()
 ...to the JS call and problem solved.

Hope this helps,
Joe
Tags
Window
Asked by
Joe
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Joe
Top achievements
Rank 2
Share this question
or