radalert skin

6 posts, 0 answers
  1. Tracy Dryden
    Tracy Dryden avatar
    34 posts
    Member since:
    Dec 2005

    Posted 12 Jan 2012 Link to this post

    Is is possible to specifiy a different skin for the radalert window than the others? I'd really like my radalert windows to stand out with a different color scheme that the rest of my radwindows.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 13 Jan 2012 Link to this post

    Hello,

    The RadWindow objects that implement the dialogs get the setting for their Skin property from the RadWindowManager. If you have more than one window then you can use different RadWindowManager with different skin.

    Thanks,
    Princy.
  3. Tracy Dryden
    Tracy Dryden avatar
    34 posts
    Member since:
    Dec 2005

    Posted 13 Jan 2012 Link to this post

    I thought that having multiple RadWindowManagers on a page was a no-no. How to I call radalert when there's more than one of them?
    I think you misunderstood. I want to specify WebBlue as the skin for all radwindows except the radalert window. For the radalert window I want to use my custom skin. From what you posted I'm guessing the answer is "No". Pretty shortsighted to force that limitation, especially when alert windows in particular should stand out from all other windows. While waiting for a reply I've already written a workaround by using a normal radwindow with my custom skin and a custom alert function.
  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5243 posts

    Posted 13 Jan 2012 Link to this post

    Hello Tracy,

    The RadAlert is created dynamically (via JavaScript) by the RadWindowManager and thus it always takes the skin from its manager. This cannot be changed due to the dynamic nature of the RadAlert - it is no known when or if it will be used on the page and it is not a predefined control, but an HTML template.

    That being said - the approach that Princy suggested is the best way to achieve this functionality. You can reference the second RadWindowManager (via mngrCustomSkin = $find("secondManagerClientID")) then call its own radalert method:   mngrCustomSkin .radalert(), as the radalert is actually a method from the manager, it is only copied to a global function: http://www.telerik.com/help/aspnet-ajax/window-programming-radwindowmanager-methods.html. Please also examine the following article on working with multiple managers as it will also shed some light on the approach: http://www.telerik.com/help/aspnet-ajax/radwindow-troubleshooting-wrong-window-opened.html. Note that the global radalert(), radconfirm() and radprompt() will invoke a dialog from the first manager on the page, and you can use the second instead by, for example, storing a reference to it in the pageLoad event.

    If you still find this approach is not viable you can still use your current workaround by using a specific RadWindow for the purpose.


    Greetings,
    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
  5. Tracy Dryden
    Tracy Dryden avatar
    34 posts
    Member since:
    Dec 2005

    Posted 13 Jan 2012 Link to this post

    Thanks! That clears things up a lot!

    Due to the functionality I've written into it, I think I'll stick with my custom alert, but the info you gave is nice to know!
  6. M. R.
    M. R. avatar
    49 posts
    Member since:
    Dec 2009

    Posted 01 Mar 2012 Link to this post

    Hello,

    You can do the following: add 2 radWindowManager on the page and specify different skins:

    <telerik:RadWindowManager

    ID="RadWindowManager1" runat="server" AutoSize="True" DestroyOnClose="True"

    EnableShadow="true" Skin="Forest">
    </
    telerik:RadWindowManager>

     (for your RadAlert only)

    <telerik:RadWindowManager

    ID="RadWindowManager2" runat="server" AutoSize="True" DestroyOnClose="True"

    EnableShadow="true" Skin="Hay">

    </telerik:RadWindowManager>

     (for the rest of your Rad windows)

    Call radAlert from code:

    RadWindowManager1.RadAlert(

    "RadAlert style one", 330, 100, "RadAlert", "")

     

    or

    RadWindowManager2.RadAlert(

    "RadAlert style 2", 330, 100, "RadAlert", "")

    Regards,
    M.R.

     

Back to Top