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

Opening a window from another window.

1 Answer 36 Views
Window
This is a migrated thread and some comments may be shown as answers.
Alessio
Top achievements
Rank 1
Alessio asked on 04 Nov 2008, 11:11 AM
Hi,
I am a newby on telerik suite.

I have a problem.

In my Dot.net application i want to open a new RadWindow from another RadWindow, when i clik to a button in my first Window.

To do this, I use a RadToolBar control whitin a RadToolBarButton:

<

 

telerik:RadToolBar ID="RadToolBar1" runat="server" OnClientButtonClicking="clientButtonClicked">
    <Items>
        <telerik:RadToolBarButton runat="server" Text="New Window" />
    </Items>
</telerik:RadToolBar>

OnClientButtonClicking is this:

 

 

function clientButtonClicked(sender, args){
var parentPage = GetRadWindow().BrowserWindow;
var parentRadWindowManager = parentPage.GetRadWindowManager();
var oWnd2 = parentRadWindowManager.open("FrmUser/ContactDetails.aspx","New"); oWnd2.setSize(600,600);
oWnd2.setActive();
return false;
}

 

 

My problem is that when i click on the button, the new window appears under the first window.

 

Thank.

Alessio.

 

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 07 Nov 2008, 02:25 PM
Hello Alessio,

Try using setActive(true); with a small timeout - actually even a timeout of 0ms should do the trick.
e.g:
window.setTimeout(function() 
    oWnd.setActive(true);  
},0); 





Kind regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Alessio
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or