Radwindow border problem

6 posts, 0 answers
  1. Asif
    Asif avatar
    49 posts
    Member since:
    Jul 2010

    Posted 05 Oct 2011 Link to this post

    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
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4614 posts

    Posted 06 Oct 2011 Link to this post

    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
  3. Asif
    Asif avatar
    49 posts
    Member since:
    Jul 2010

    Posted 10 Oct 2011 Link to this post

    Please check in my query I am opening radwindow through javascript where should I write the CSS to remove border
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Oct 2011 Link to this post

    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.
  5. Asif
    Asif avatar
    49 posts
    Member since:
    Jul 2010

    Posted 10 Oct 2011 Link to this post

    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
  6. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4614 posts

    Posted 11 Oct 2011 Link to this post

    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
Back to Top