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

How to set Sizes from code behind

1 Answer 164 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 31 Aug 2012, 08:36 AM
Hi,
I have managed to open a Rad Window from the code behind, and it does everything I want, however I would like to be able to set the size, as currently it is tiny.
The code I currently have is...
Protected Sub RadGrid1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RadGrid1.SelectedIndexChanged
    If RadGrid1.SelectedItems.Count > 0 Then
        For Each item As GridDataItem In RadGrid1.SelectedItems
            Dim strid As String
            strid = item("UniqueID").Text
            Session("Selected") = "Selected"
            Session("ID") = strid
 
            Dim newwidow As New RadWindow
            newwidow.NavigateUrl = "MessageForm1.aspx"
            RadWindow1.Windows.Add(newwidow)
 
 
 
 
        Next
    End If
End Sub

How do I set the size of this window?
And How do i name it?

Thanks for your help
Ryan

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 31 Aug 2012, 10:18 AM
Hi,

Try setting the height as shown below.
VB:
newwidow.Title = "your title"
newwidow.Width = Unit.Pixel(280)
newwidow.Height = Unit.Pixel(120)

Thanks,
Shinu.
Tags
Window
Asked by
Ryan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or