4 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 17 Nov 2008, 04:40 AM
Hi Saadi,
You can set the RadWindow properties from server side and can open the RadWindow. In order to achieve that, you have to add RadWindowManager in page and add the windows dynamically. Please try the below code snippet.
ASPX:
C#:
You can also refer to these links for more information about this.
Setting Server-Side Properties
Setting RadWindow and RadWindowManager properties serverside
Thanks,
Shinu.
You can set the RadWindow properties from server side and can open the RadWindow. In order to achieve that, you have to add RadWindowManager in page and add the windows dynamically. Please try the below code snippet.
ASPX:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"> |
</telerik:RadWindowManager> |
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Open Window" /> |
C#:
protected void Button1_Click(object sender, EventArgs e) |
{ |
RadWindow newWindow = new RadWindow(); |
newWindow.NavigateUrl = "http://www.google.com"; |
newWindow.Top = Unit.Pixel(22); newWindow.VisibleOnPageLoad=true; |
newWindow.Left = Unit.Pixel(0); |
RadWindowManager1.Windows.Add(newWindow); |
} |
You can also refer to these links for more information about this.
Setting Server-Side Properties
Setting RadWindow and RadWindowManager properties serverside
Thanks,
Shinu.
0

fduverseau
Top achievements
Rank 1
answered on 09 Dec 2008, 12:56 PM
Hello,
I also need to do the same thing on the server-side because I need to run some code before opening the window.
I've tried the above sample code but the window opens only after the second button click...
How can I make the window open on the first click?
BTW: Both controls are located inside an UpdatePanel control inside a MasterPage
Thank you
Frantz
I also need to do the same thing on the server-side because I need to run some code before opening the window.
I've tried the above sample code but the window opens only after the second button click...
How can I make the window open on the first click?
BTW: Both controls are located inside an UpdatePanel control inside a MasterPage
Thank you
Frantz
0
Hello Frantz,
I am not quite sure what might be happening on your side until I examine your code. I prepared a sample demo project based on your explanations but everything is working as expected - the RadWindow is shown every time the button is clicked, including the very first time. Please, examine the test demo and in case your problem persists, please modify the demo in order to reproduce your problem, open a new support ticket and send it to us along with detailed reproduction instructions and explanations.
Sincerely yours,
Svetlina
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I am not quite sure what might be happening on your side until I examine your code. I prepared a sample demo project based on your explanations but everything is working as expected - the RadWindow is shown every time the button is clicked, including the very first time. Please, examine the test demo and in case your problem persists, please modify the demo in order to reproduce your problem, open a new support ticket and send it to us along with detailed reproduction instructions and explanations.
Sincerely yours,
Svetlina
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

fduverseau
Top achievements
Rank 1
answered on 11 Dec 2008, 08:21 PM
Hi Svetlina,
I was missing this line of code:
newWindow.VisibleOnPageLoad=true;
Thanks
I was missing this line of code:
newWindow.VisibleOnPageLoad=true;
Thanks