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

Auto maximize window when loaded

3 Answers 202 Views
Window
This is a migrated thread and some comments may be shown as answers.
Trinh Nguyen
Top achievements
Rank 1
Trinh Nguyen asked on 13 Jun 2011, 09:26 PM
Hi,
I have a button. When I click on the button, the Rad window pop up. How can I set the window maximize itself when opens?
Thanks

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Jun 2011, 06:50 AM
Hello Trinh,

You can achieve this by setting the InitialBehaviors property which controls the state of the window when it first appears.It controls whether the window appears maximized, minimized, and/or pinned.

Another approach is from client side. Here is a sample code.
Javascript:
function openWindow()
{
var oWnd = $find("<%= DialogWindow.ClientID %>");
oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Maximize + Telerik.Web.UI.WindowBehaviors.Close)
. . . . . . . . . . . . .
}

Hope it helps.
Thanks,
Shinu.
0
Trinh Nguyen
Top achievements
Rank 1
answered on 11 Jul 2011, 04:03 AM
Hi, I want the window appears as maximized state, not having just a maximize and close button.
When you click on the button, the window will open and depending on your browser space, the windows will be MAXIMIZED and cover up the whole space.
Thanks
0
Georgi Tunev
Telerik team
answered on 11 Jul 2011, 12:44 PM
Hi Trinh,

If you want to initially open a maximized RadWindow, you need to set its InitialBehaviors property to Maximize. Note that this property controls the initial showing only. If you close the window (and you don't have DestroyOnClose=true) and then show it again, RadWindow will be shown in its restored state. In such case, it is best to manually call maximize() every time you show the window.


Kind regards,
Georgi Tunev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Window
Asked by
Trinh Nguyen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Trinh Nguyen
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or