open radwindow popup from button click code behind

Posted by Jopito under ASP.NET on 1/27/2014 | Points: 10 | Views : 10163 | Status : [Member] | Replies : 1
Hello.Am trying to assign radwindow popup properties from code behind so as i can open a popup.However ,the radwindow does not pick the sizes am allocating.Any idea how i can solve this.Below is how i am assigning it

RadWindowManager radWindow = new RadWindowManager();
RadWindow newWindow =new RadWindow();
newWindow.Modal = true;
newWindow.AutoSize = false;
newWindow.Left = Unit.Pixel(70);
//newWindow.Width = Unit.Pixel(470);
//newWindow.Height = Unit.Pixel(470);
newWindow.NavigateUrl = "Registration.aspx";
newWindow.VisibleOnPageLoad = true;
newWindow.Attributes.Remove("Height");
newWindow.Attributes.Remove("Width");
//newWindow.Attributes.AddAttributes("Width", "470px");
//newWindow.Attributes.AddAttributes("Height", "470px");
newWindow.Attributes.Add("Width", "470px");
newWindow.Attributes.Add("Height", "470px");
newWindow.OnClientClose = "refreshRegistration";


RadWindowManager1.Windows.Add(newWindow);

Any solution why radwindow the radwindow cannot pick the sizes?Even the OnClientClose is not showing any response

Mark as answer if satisfied


Responses

Posted by: A2H on: 3/5/2014 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi,
You don't need to remove the Width attribute through code when assigning the width and height of Telerik Rad Window.
Below Code is assigning height and width properly in my sample application.
RadWindowManager radWindow = new RadWindowManager();

RadWindow newWindow = new RadWindow();

newWindow.Modal = true;

newWindow.AutoSize = false;

newWindow.Left = Unit.Pixel(70);
//Assigning width to radwindow
newWindow.Width = Unit.Pixel(470);
//Assigning height to radwindow
newWindow.Height = Unit.Pixel(470);

newWindow.NavigateUrl = "WebForm2.aspx";

newWindow.VisibleOnPageLoad = true;

//newWindow.Attributes.Remove("Height");

//newWindow.Attributes.Remove("Width");

//newWindow.Attributes.AddAttributes("Width", "470px");

//newWindow.Attributes.AddAttributes("Height", "470px");

//newWindow.Attributes.Add("Width", "470px");

//newWindow.Attributes.Add("Height", "470px");

newWindow.OnClientClose = "refreshRegistration";

RadWindowManager1.Windows.Add(newWindow);

Hope this helps.

Thanks,
A2H
Please mark my reply as answer if it helps to resolve your problem

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response