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

Radwindow border problem

5 Answers 178 Views
Window
This is a migrated thread and some comments may be shown as answers.
Asif
Top achievements
Rank 1
Asif asked on 05 Oct 2011, 07:33 AM
Hello Support

Through various telerik references provided by you. I am able to create the pop-up as per the requirements. Thanks
Only one issue is that, I want to remove the border. I have remove the title bar. But still thick border is coming.

function AlertCust() {
    var wnd = radopen("../Alerts.aspx?", "Window1");
    wnd.set_modal(false);

    var oManager = GetRadWindowManager();
    var oWindow = oManager.GetWindowByName("Window1");

    oWindow.set_visibleTitlebar(false);
    oWindow.setSize(500, 150);
    oWindow.moveTo(20, 320);


Since I have generated the pop-up using javascript hence I have to do something from here itself so that border is invisible.

Thanks
Asif

5 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 06 Oct 2011, 09:23 AM
Hello Asif,

The RadWindow's borders are achieved via CSS, background image sprites and dedicated HTML elements for the purpose. There is no simple property for turning them off. What you can do is use CSS to hide the said elements, for example:
.RadWindow_Sunset .rwCorner .rwTopLeft, 
 .RadWindow_Sunset .rwTitlebar, 
 .RadWindow_Sunset .rwCorner .rwTopRight, 
 .RadWindow_Sunset .rwIcon,
 .RadWindow_Sunset table .rwTopLeft, 
 .RadWindow_Sunset table .rwTopRight, 
 .RadWindow_Sunset table .rwFooterLeft, 
 .RadWindow_Sunset table .rwFooterRight, 
 .RadWindow_Sunset table .rwFooterCenter, 
 .RadWindow_Sunset table .rwBodyLeft, 
 .RadWindow_Sunset table .rwBodyRight, 
 .RadWindow_Sunset table .rwTitlebar, 
 .RadWindow_Sunset table .rwTopResize,
 .RadWindow_Sunset table .rwStatusbar,
 .RadWindow_Sunset table .rwStatusbar .rwLoading
{   
    display: none !important;  
}

<telerik:RadWindow runat="server" ID="RadWindow1" Skin="Sunset" VisibleOnPageLoad="true" NavigateUrl="http://google.com/"></telerik:RadWindow>

Please note that this will affect RadWindows with the Sunset skin. I have done this on purpose to allow other RadWindows to have their full appearance available if they do not use this skin.

Another approach is to create a custom skin where you will remove the borders and use this skin. This is the more reusable approach. How to externalize a skin so that you can modify it is explained in the following link: http://www.telerik.com/help/aspnet-ajax/window-appearance-css-classes-usage.html.


All the best,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Asif
Top achievements
Rank 1
answered on 10 Oct 2011, 09:24 AM
Please check in my query I am opening radwindow through javascript where should I write the CSS to remove border
0
Princy
Top achievements
Rank 2
answered on 10 Oct 2011, 09:36 AM
Hello Asif,

You could write the CSS in the head section as shown below.
aspx:
<head runat="server">
  <style type="text/css">
  .....
  </style>
</head>

Thanks,
Princy.
0
Asif
Top achievements
Rank 1
answered on 10 Oct 2011, 09:49 AM
This I already know how to implement the styles CSS in page. Also tried this but, it is not working. Radwindow is created through javascript
0
Marin Bratanov
Telerik team
answered on 11 Oct 2011, 10:43 AM
Hi Asif,

A RadWindow is always created via JavaScript - its entire UI is created only when it has to be shown and this is also the point where the scripts and CSS files are loaded. This means that these CSS rules should either be placed in the head section of the page, or you would need to create a custom skin, as I explained in my previous post.

I am also attaching a simple page which removes the borders correctly. You can confirm this in the attached screenshot as well. Please make sure that the skin set to the RadWindow is the same as the one used in the CSS selectors. In my example this is the Sunset skin, if you are using a different one you would need to replace Sunset with your skin name.


Best wishes,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Window
Asked by
Asif
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Asif
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or