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

Radwindow Does not open on button click from server side event

1 Answer 58 Views
Window
This is a migrated thread and some comments may be shown as answers.
Bhavesh
Top achievements
Rank 1
Bhavesh asked on 20 Feb 2010, 11:39 AM
Hello Friends,
                     I want to open radwindow on button click event from server side. I have write following code for open radwindow but it is not working. Please reply me what is wrong and how to overcome this solution.
My aspx page look like,
<asp:content..........>
<asp:RadAjaxPanel...................>
 <asp:button  ................. onclick="Event_name"/>

</asp:RadAjaxPanel>


</asp:content>

Coding have been written on button click event,
protected void InsertButton_Click(object sender, ImageClickEventArgs e)
{
               RadWindow newwindow = new RadWindow();
                newwindow.ID = "SolutionRadWindow1";
                newwindow.NavigateUrl = "Page.aspx";
                newwindow.Width = Unit.Pixel(800);
                newwindow.Height = Unit.Pixel(500);
                Singleton.Windows.Add(newwindow);
}

Regards,
Bhavesh Rana

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 20 Feb 2010, 11:49 AM
Hello,

Set the VisibleOnPageLoad property of new window to True. Also make sure that the RadWindowManager control is added on page.

CS:
 
        RadWindowManager Singleton = new RadWindowManager(); 
        RadWindow newwindow = new RadWindow(); 
        newwindow.ID = "SolutionRadWindow1"
        newwindow.NavigateUrl = "Page.aspx"
        newwindow.Width = Unit.Pixel(800); 
 
        newwindow.VisibleOnPageLoad = true
 
        newwindow.Height = Unit.Pixel(500); 
        Singleton.Windows.Add(newwindow); 
        this.form1.Controls.Add(Singleton); 

-Shinu.
Tags
Window
Asked by
Bhavesh
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or