Radwindow size to parent codebehind

3 posts, 1 answers
  1. Derek
    Derek avatar
    8 posts
    Member since:
    Sep 2011

    Posted 19 Sep 2011 Link to this post

    Hi,

    I'm new to developing world as well as telerik.I have a web app where I'm using telerik controls.
    I wanting to be able to size a rad window on open to the parent's size from code behind as to accmodate different resolutions.
    Im using vb.net.

    Im currently using the below but thats at a fixed pixel which is not what I'm looking for.

              

    Private

    Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click

    Dim rw As New RadWindow

    rw.ShowContentDuringLoad =

    True

    rw.Width = Unit.Pixel(1200)

     

    rw.Height = Unit.Pixel(600)

    rw.KeepInScreenBounds =

    True

    rw.Modal =

     

    True

    rw.NavigateUrl =

     

    "test.aspx"

    rw.VisibleOnPageLoad =

     

    True

    RadWindowManager1.Windows.Add(rw)
    End Sub

     



    Any help would be appreciated. Thanks
  2. Answer
    Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 19 Sep 2011 Link to this post

    Hello Derek,

    I'm assuming that you want your RadWindow to be Maximized so it takes up the whole page size. You could do it by adding this line to your code:

    rw.InitialBehaviors = WindowBehaviors.Maximize;

    This will Maximize the window when the page loads.

    I hope that helps.
  3. Derek
    Derek avatar
    8 posts
    Member since:
    Sep 2011

    Posted 19 Sep 2011 Link to this post

    Thanks Kevin.

    That should work, simple yet effective.
Back to Top