Chris Gårdenberg
Top achievements
Rank 2
Chris Gårdenberg
asked on 02 Feb 2011, 04:07 PM
Hi,
I use the radwindow to show detailed views of the data in a grid, but I want to set the popups in a preset size, so it doesn't open up a small 200x200px window and then resizes to the content size.
Can I use something like:
window.radopen('url_goes_here', 'window_name_here', width_goes_here, height_goes_here)
or
window.radopen('url_goes_here', 'window_name_here', 'width=width_goes_here,height=height_goes_here')
Didn't find anything in the forum or documentation.
I use the radwindow to show detailed views of the data in a grid, but I want to set the popups in a preset size, so it doesn't open up a small 200x200px window and then resizes to the content size.
Can I use something like:
window.radopen('url_goes_here', 'window_name_here', width_goes_here, height_goes_here)
or
window.radopen('url_goes_here', 'window_name_here', 'width=width_goes_here,height=height_goes_here')
Didn't find anything in the forum or documentation.
8 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 03 Feb 2011, 10:32 AM
Hello Chris,
You can use the ASP.NET AJAX $find() method to get a reference to the RadWindow on your page. Now you can use the client-side properties and methods to manipulate the windows in the browser
Please take look at these documentations.
Opening Windows
RadWindow Methods
Thanks,
Shinu.
You can use the ASP.NET AJAX $find() method to get a reference to the RadWindow on your page. Now you can use the client-side properties and methods to manipulate the windows in the browser
Please take look at these documentations.
Opening Windows
RadWindow Methods
Thanks,
Shinu.
0
Chris Gårdenberg
Top achievements
Rank 2
answered on 03 Feb 2011, 10:47 AM
Hi Shinu,
Thanks for the suggestion, but the problem I have is when I open the window. It resizes just fine after it's opened, but I have to make sure the window is opened with the size parameters, so the user won't see the animation or flickering of the resize.
Thanks for the suggestion, but the problem I have is when I open the window. It resizes just fine after it's opened, but I have to make sure the window is opened with the size parameters, so the user won't see the animation or flickering of the resize.
0
Hi Chris,
What Shinu suggested is to open a specific RadWindow, by getting a reference to it, set its properties and show it after that.
e.g.
Currently, there is a small glitch in that funcitonality, as the window is shown in the top left corner of the page, but this will be fixed with the next update.
Best wishes,
Georgi Tunev
the Telerik team
What Shinu suggested is to open a specific RadWindow, by getting a reference to it, set its properties and show it after that.
e.g.
function
showWin()
{
var
oWnd = $find(
"<%= RadWindow1.ClientID %>"
);
oWnd.setUrl(
"http://google.com"
);
oWnd.setSize(600, 300);
oWnd.show();
}
Currently, there is a small glitch in that funcitonality, as the window is shown in the top left corner of the page, but this will be fixed with the next update.
Best wishes,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Chris Gårdenberg
Top achievements
Rank 2
answered on 03 Feb 2011, 12:45 PM
Hi Georgi,
Yes, that approach works fine when I have a predefined window, but this window opens with window.radopen
And the most preferable solution would be to be able to use window.radopen('http://www.google.com', null, 800, 600);
This is because we must be able to open more than one window at the same time.
Yes, that approach works fine when I have a predefined window, but this window opens with window.radopen
And the most preferable solution would be to be able to use window.radopen('http://www.google.com', null, 800, 600);
This is because we must be able to open more than one window at the same time.
0
Hi Chris,
Thank you for the suggestion. Currently, this is not possible but I logged it as a new feature request in our PITS and updated your points.
Here is a direct link to the PITS item:
http://www.telerik.com/support/pits.aspx#/public/aspnet-ajax/4799
By the way, regarding the glitch I talked about in my previous reply, we found out what is causing the problem and although the internal logic cannot be changed, you could avoid it by switching the steps - you need to first set the size of the window object and then set its Url.
e.g.
All the best,
Georgi Tunev
the Telerik team
Thank you for the suggestion. Currently, this is not possible but I logged it as a new feature request in our PITS and updated your points.
Here is a direct link to the PITS item:
http://www.telerik.com/support/pits.aspx#/public/aspnet-ajax/4799
By the way, regarding the glitch I talked about in my previous reply, we found out what is causing the problem and although the internal logic cannot be changed, you could avoid it by switching the steps - you need to first set the size of the window object and then set its Url.
e.g.
function
showWin()
{
var
oWnd = $find(
"<%= RadWindow1.ClientID %>"
);
oWnd.setSize(600, 300);
oWnd.setUrl(
"http://google.com"
);
oWnd.show();
}
All the best,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Accepted
Nishant
Top achievements
Rank 1
answered on 09 Jul 2012, 08:48 PM
Instead of this :
window.radopen('url_goes_here', 'window_name_here', width_goes_here, height_goes_here)
try this:
window.radopen(url_goes_here, window_name_here).setSize(width_goes_here, height_goes_here)
window.radopen('url_goes_here', 'window_name_here', width_goes_here, height_goes_here)
try this:
window.radopen(url_goes_here, window_name_here).setSize(width_goes_here, height_goes_here)
0
David
Top achievements
Rank 1
answered on 03 Jul 2013, 02:01 PM
Thank you Nishant! Your .setSize(W,H) worked perfectly!
0
Hi guys,
Since Q1 2013 this functionality is built-in in the RadWIndowManager control. You can read more about it here: http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html and test it live here: http://demos.telerik.com/aspnet-ajax/window/examples/radopen/defaultcs.aspx.
Regards,
Marin Bratanov
Telerik
Since Q1 2013 this functionality is built-in in the RadWIndowManager control. You can read more about it here: http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html and test it live here: http://demos.telerik.com/aspnet-ajax/window/examples/radopen/defaultcs.aspx.
Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.