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

Open RadWindow On button Click

4 Answers 456 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 1
Rahul asked on 29 May 2009, 06:06 AM
Hello Sir

 I want to open Rad window on  image button event Click in vb.net. i have dont this code but Radwindow not open with that form why >?


 Dim winmgr As New RadWindowManager
    Dim winwdw As New RadWindow
    Protected Sub imgmail_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgmail.Click

        winwdw.Height = 500
        winwdw.Width = 500
        winwdw.Modal = True
        '  winwdw.Behavior = WindowBehaviors.Default
        winwdw.NavigateUrl = "ReportEmail.aspx"
        winwdw.Visible = True
        winwdw.Enabled = True
        winmgr.Windows.Clear()

        winmgr.Windows.Add(winwdw)

    End Sub



Help me it Urgnet

Thanks For valuable time


4 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 29 May 2009, 06:30 AM
Hi Rahul,

Give a try with following code snippet.

VB:
 
Private winmgr As New RadWindowManager() 
Protected Sub Page_Load(ByVal sender As ObjectByVal e As EventArgs) 
    Me.form1.Controls.Add(winmgr) 
End Sub 
Protected Sub Button1_Click(ByVal sender As ObjectByVal e As EventArgs) 
    Dim winwdw As New RadWindow() 
    winwdw.Height = 500 
    winwdw.Width = 500 
    winwdw.Modal = True 
    winwdw.NavigateUrl = "http://www.google.com" 
    winwdw.Visible = True 
    winwdw.Enabled = True 
    winwdw.VisibleOnPageLoad = True 
    winmgr.Windows.Clear() 
    winmgr.Windows.Add(winwdw) 
End Sub 
You can also refer the following help article for more information on this.
Setting Server-Side Properties

Thanks,
Shinu.
0
mahendra reddy
Top achievements
Rank 1
answered on 23 Jul 2009, 10:28 AM
Hi Im not satisfied with this answer ..

Actually Im also facing same problem. 

I have one aspx button when ever it is clicked I want to open the radwindow. But I want to open it from my cs file.(But not onpageload actually on postback event i want to open rad window)

I dont want to write a script that executes at client. Im calling the code inside the repeater item  (LinkButton Click  event) its not working...

Please help me
0
Shinu
Top achievements
Rank 2
answered on 23 Jul 2009, 11:18 AM
Hi Mahendra Reddy,

You can try the following code snippet for opening the RadWindow from code behind.

C#:
 
protected void Button1_Click(object sender, EventArgs e) 
    RadWindow window1 = new RadWindow(); 
    window1.NavigateUrl = "http://www.google.com"
    window1.VisibleOnPageLoad = true
    window1.Width = 500; 
    window1.Height = 300; 
    this.form1.Controls.Add(window1); 
Note: Make sure that you set the VisibleOnPageLoad property to True.

Shinu
0
mahendra reddy
Top achievements
Rank 1
answered on 23 Jul 2009, 11:29 AM
Hi shinu,

              Thanks for your reply. Actually my buttons are populating through the repeater. If im writing your code individually its working fine. but inside the repeater im not able to find the solution
Tags
Window
Asked by
Rahul
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
mahendra reddy
Top achievements
Rank 1
Share this question
or