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

radwindowmanager size issue/question.

3 Answers 70 Views
Window
This is a migrated thread and some comments may be shown as answers.
Stacy
Top achievements
Rank 1
Stacy asked on 02 Nov 2017, 03:15 PM

Hi, I have a radwindowmanager with the following properties set.

ClientIDMode="Static"
ID="YearEndWindows"
Width="1000"
Height="600"
VisibleStatusbar="false"
Behaviors="Close,Move,Resize"
runat="server"
OnClientClose="onClientClose"
DestroyOnClose="true"
Modal="true"
ShowContentDuringLoad="false"

I have two buttons that use this to open a window.  If I click a button and open the first window, all is good.  If I click the second button and try to use javascript to change the height/width, the window still opens 1000x600 even though it was changed thru code.  Is there an issue or am I using this wrong?

 

JavaScript:

var manager = $find(managerName);

if (fullscreenMode) { //Boolean I pass in to change the default 1000x600 setting

    manager.setSize(1920, 1075);

}

manager.open(url, null); //url is populated

 

Also if I change the code to this:

manager.open(getUrl(url), null, 300, 300);

I get a javascript error complainging about 'getElementsByTagName'. 

 

Any ideas?  Thanks.

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 02 Nov 2017, 03:48 PM
Hi Stacy,

RadWndow (and all controls from the UI for ASP.Net AJAX) does not support static IDs and cannot function properly when used with ClientIDMode="Static". Please, set the ClientIDMode="AutoID" and see if the problem persists.

Regards,
Vessy
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Stacy
Top achievements
Rank 1
answered on 07 Nov 2017, 01:55 PM

Tried that but that is even worse as it causes a javascript blowup as I cant "find" my window unless the ClientIDMode is static.

ex. 

var managerName = 'YearEndWindows';

var manager = $find(managerName); //blowups up since ClientIDMode is not static.

 

Our app always used ClientIDMode=static and has many $find calls to open windows and haven't had an issue except the one I just logged.

 

0
Vessy
Telerik team
answered on 10 Nov 2017, 11:26 AM
Hi Stacy,

You can get reference to the controls with AutoID by accessing it though a server-side tag. Please, note that this is not specific to our controls but is a general programming issue:
http://codedotnets.blogspot.bg/2012/01/how-get-id-server-control-javascript.html

For example:
var manager = $find("=<%YearEndWindows.ClientID%>");

Regards,
Vessy
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Window
Asked by
Stacy
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Stacy
Top achievements
Rank 1
Share this question
or