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

rad window's position

2 Answers 167 Views
Window
This is a migrated thread and some comments may be shown as answers.
yao wang
Top achievements
Rank 1
yao wang asked on 26 May 2010, 11:11 PM
Thanks for the great help from the Telerik team.

I have successfully opened multiple radwindows.  In home page, it contains the radwindowmanager with the

RestrictionZoneID ="R",

 

 

I open a radwindow "G" under the radwindowmanager in the home page. then I clicked the button inside radwindow "G" to open multiple radwindows "W" in designed positions respectively.

everything looks good except for one issue, when I use the method to get the moveto positions, I have to minus the restriction. for example: 

 

 

position = positionInfo( listPosition.left + col * width + width,listPosition.top + row * height - restriction);
// calcuate the moveto position,

which could cause  probelms
1. if I minus the restriction, the radwinow"W" will be opened at the right position. but when the radwindow "G" is close to the top, I minus the restriction, the position.top <0 and thus radwindow "W" will be positioned in wrong position
2.if I do not minus the restriction
.the radwindows"w" will be opened at a lower position with the difference of restriction. when the radwindow"G" is close to bottom, the position.top is beyond the bottom line and thus radwindow "W" will be positioned in wrong position.

How to avoid the restriction side effect?

Thanks a lot   

 

 

 

 

 

 

  

2 Answers, 1 is accepted

Sort by
0
yao wang
Top achievements
Rank 1
answered on 27 May 2010, 08:37 PM
in this demo, http://mono.telerik.com/Window/Examples/OpenAndPosition/DefaultCS.aspx, it is said," Top and Left can be used along with the RestrictionZoneID property as well. If the RestrictionZoneID property is set, Top and Left will be calculated towards the top left corner of the restriction zone. "

 

I open a radwindow "G" under the radwindowmanager in the home page, then I clicked the button inside radwindow "G" to open multiple radwindows "W" in designed positions respectively.

When I tried to open the multiple radwindow "w", how can I relate the radwindow with the RestrictionZoneID ? I can get the position of the restriction, for example [8,83].

 

 var parentPage = GetRadWindow().BrowserWindow;

 var oMan = parentPage.GetRadWindowManager();

 var oWnd = oMan.open("<%=GetWidgetURL(Settings.PAGE_ASSETMARKETVIEW)%>" + "?aid=" + assetId, amvName);

 oWnd.set_behaviors(parentPage.Telerik.Web.UI.WindowBehaviors.Close + parentPage.Telerik.Web.UI.WindowBehaviors.Move + parentPage.Telerik.Web.UI.WindowBehaviors.Resize);

oWnd.SetSize(GetWidth(), GetHeight());

 

//width, height

 

oWnd.moveTo(pos.left, pos.top);
// how can I related the moveto with the restrictionzoneid, I set oWnd.set_offsetElementID("R"), but it does not work.

please help me to figure out the way, thanks.

 

0
Fiko
Telerik team
answered on 01 Jun 2010, 11:14 AM
Hello Yao,

By design RadWindow's moveTo method takes into account the restriction zone set to the RadWindow object. I am not quite sure what is the expected behavior in your case and I need some more informational in order to be able to help:
  • I need more information about your setup. Could you please paste the code that you use in your project, including the related CSS, code behind, and JavaScript files?
  • Please provide me with detailed reproduction steps, that I need to follow in order to recreate the problem
  • A detailed explanation of the expected result in your scenario and the differences compared to the actual result.
It will be best if you open a new support ticket and send me a sample project which shows your setup.

Kind regards,
Fiko
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.
Tags
Window
Asked by
yao wang
Top achievements
Rank 1
Answers by
yao wang
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or