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

radopen works differently after the first call

3 Answers 83 Views
Window
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 18 May 2011, 10:26 PM
Simple situation.

In the web page:

<telerik:RadWindowManager ID="RWMan" runat="server">

 

   <Windows>

 

    <telerik:RadWindow ID="RWITaskView" runat="server" Width="400" Height="200" BorderColor="Blue"

 

      DestroyOnClose="true" VisibleTitlebar="true" VisibleStatusbar="false"
 
     NavigateUrl ="MemberITaskView.aspx"

 

      VisibleOnPageLoad="false" AutoSize="true" AutoSizeBehaviors="Height, Width"
      KeepInScreenBounds
="false" Behaviors ="Close,Move"

 

      EnableShadow="true" EnableEmbeddedSkins ="false">

 

    </telerik:RadWindow >

 

    <telerik:RadWindow ID="RWITaskEdit" runat="server" Width="400" Height ="200"

 

      DestroyOnClose="true" VisibleTitlebar="true" VisibleStatusbar="false"
      NavigateUrl
="MemberITaskEdit.aspx"

 

      VisibleOnPageLoad="false" AutoSize="true" AutoSizeBehaviors="Height, Width"
      KeepInScreenBounds
="false" Behaviors ="Close,Move"

 

      EnableShadow="true" EnableEmbeddedSkins ="false">

 

    </telerik:RadWindow >

 

  </Windows >

 

</telerik:RadWindowManager >


In databind event for a grid:

 

 

(e.Item.Cells[ViewPos].Controls[1]

 

as HyperLink).Attributes["onclick"] = "ShowITaskView('" + ky + "');" ;

 

 

 

 

 
In webpage script:

 

 

function ShowITaskView(id) {  

 

var Wnd = radopen("MemberITaskView.aspx?itid=" + id, "RWITaskView" );

 

 

 

 

 return false  

 

 

}

 

 

PROBLEM:
1. On the first click on a hyperlink in the RadGrid control,
    The autosize and everything works fine EXCEPT that the title bar and boundaries have opacity 0 somehow
2. On subsequent clicks on hyperlinks in same or other rows,
    Autosize and everything does NOT work, AND the title bar and boundaries are normal.

See the two screen shots.

Any ideas?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 19 May 2011, 08:04 AM
Hello Chris,

 Straight to your questions:


1) You have set EnableEmbeddedSkins to false and thus the embedded styles are not applied. The titlebar as other elements of RadWindow has a background image set by our styles which you have disabled and thus it looks like this. You should either set your own style and background or enable the embedded ones to get the desired visual result.


2) The behavior you describe comes from the fact that you have set the DestroyOnClose property. When you set DestroyOnClose to true this means that the RadWindow client object will be destroyed the first time you close the RadWindow. That is why when you call radopen again  with the same ID, there is no longer such predefined RadWindow and the manager dynamically creates a new one with the manager settings and the ID you have passed. To achieve what you need you should either set DestroyOnClose to false or set the settings to the manager or dynamically set them through the client API when opening the RadWindow.

I hope that my explanations and suggestions are helpful, let me know how it goes.



All the best,
Svetlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Chris
Top achievements
Rank 1
answered on 19 May 2011, 12:32 PM
Thanks so much. I had thought that if a window were destroyed and recreated that it would be re-created in the same manner as the original! Also, I do have a global theme set - so I'm not sure why it is not being applied to the RadWindow - but I'll put the reference on explicitly.

Thanks for your great response. I truly appreciate the speed and quality of your support at Telerik, not to mention all the great widgets!

Chris
0
Svetlina Anati
Telerik team
answered on 20 May 2011, 03:07 PM
Hello Chris,

Thank you for the good words!

To have a RadWindow actually destroyed, there should not be kept resources, values, etc and this is why this option is at all available - to release resources and improve performance. If a declared radWindow with individual properties is destroyed, to recreate it again with those settings means to have them stored and this defies the purpose of destroying it. That is why we provide the RadWindowManager control as well as the rich client API which can help you achieve what you want in this scenario even if you destroy the RadWindow on closure.

As to your other question, I am not completely sure how exactly you have set the skin and theme and why they do not work but I believe that the following topics will be helpful to better understand how to skin RadControls:

http://www.telerik.com/help/aspnet-ajax/introduction-how-skins-work.html
http://www.telerik.com/help/aspnet-ajax/introduction-skin-registration.html
http://www.telerik.com/help/aspnet-ajax/introduction-create-custom-skin.html
http://www.telerik.com/help/aspnet-ajax/introduction-themes-how-to.html

Let  me know if you have further questions, I will be glad to help. 

Best wishes,
Svetlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Window
Asked by
Chris
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Chris
Top achievements
Rank 1
Share this question
or