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

radalert skin

5 Answers 221 Views
Window
This is a migrated thread and some comments may be shown as answers.
Tracy Dryden
Top achievements
Rank 1
Tracy Dryden asked on 12 Jan 2012, 05:30 PM
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.

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 Jan 2012, 06:36 AM
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.
0
Tracy Dryden
Top achievements
Rank 1
answered on 13 Jan 2012, 02:23 PM
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.
0
Marin Bratanov
Telerik team
answered on 13 Jan 2012, 03:18 PM
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
0
Tracy Dryden
Top achievements
Rank 1
answered on 13 Jan 2012, 04:33 PM
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!
0
M. R.
Top achievements
Rank 1
answered on 01 Mar 2012, 06:01 PM
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.

 

Tags
Window
Asked by
Tracy Dryden
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Tracy Dryden
Top achievements
Rank 1
Marin Bratanov
Telerik team
M. R.
Top achievements
Rank 1
Share this question
or