radwindowmanager size issue/question.

4 posts, 0 answers
  1. Stacy
    Stacy avatar
    110 posts
    Member since:
    Dec 2010

    Posted 02 Nov Link to this post

    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.

  2. Vessy
    Admin
    Vessy avatar
    1678 posts

    Posted 02 Nov Link to this post

    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.
  3. Stacy
    Stacy avatar
    110 posts
    Member since:
    Dec 2010

    Posted 07 Nov in reply to Vessy Link to this post

    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.

     

  4. Vessy
    Admin
    Vessy avatar
    1678 posts

    Posted 10 Nov Link to this post

    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.
Back to Top