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

modality - windows within windows

1 Answer 77 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mac Bhyat
Top achievements
Rank 1
Mac Bhyat asked on 20 Jan 2010, 02:30 PM
Hi,

I am busy trying out the window controls, and I have a situation where the modality does not work as expected

my scenario is as follows

startup page has a window manager and button on the page - click on the button cause window 1 to open up as follows:

var oWin = window.radopen('WebForm1.aspx', null);

oWin.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);

oWin.set_modal(true);

oWin.set_visibleStatusbar(false);

window.setTimeout(function() { oWin.setActive(true); }, 0);



WebForm1 then has a button on it two open up another window as follows

 

var oBrowserWnd = GetRadWindow().BrowserWindow;

 

 

var oWin = oBrowserWnd.open("WebForm2.aspx",null);

 

oWin.set_behaviors(oBrowserWnd.Telerik.Web.UI.WindowBehaviors.Move + oBrowserWnd.Telerik.Web.UI.WindowBehaviors.Close);

oWin.set_modal(

true);

 

window.setTimeout(

function() { oWin.setActive(true); }, 100);

 



WebForm2 then has a button on it that reopens another instance of webform2 as follows:

 

var oBrowserWnd = GetRadWindow().BrowserWindow();

 

 

var oWin = oBrowserWnd.radopen("WebForm2.aspx", null);

 

oWin.set_behaviors(oBrowserWnd.Telerik.Web.UI.WindowBehaviors.Move + oBrowserWnd.Telerik.Web.UI.WindowBehaviors.Close);

oWin.set_modal(

true);

 

window.setTimeout(

function() { oWin.setActive(true); }, 100);

 



The idea is to get windows spawning windows -

Now that part works, the problem is that when webform1 opens it's modal to the parent (correct) but when webform2 opens it's not modal to webform1 (I can still click on webform1), however if I click to open another window in webform2, webform1 suddenly becomes modal and both webform2's are not
So it looks like Telerik is allowing a maximum of 2 forms to be active at the same time, and not only 1

Does anyone have any ideas ?

Thanks

Mac

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 21 Jan 2010, 02:02 PM
Hi Mac,

I checked the code and the only problem that I see is in the JavaScript function that you use on the second dialog:
var oBrowserWnd = GetRadWindow().BrowserWindow();
should be
var oBrowserWnd = GetRadWindow().BrowserWindow;

Other than that, the code is working as expected as you can see from the attached video. Could you please check your code and if the problem persists - to send us a small sample project in a support ticket so we could check it locally?



Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
Mac Bhyat
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or