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

RADConfirm Src icon change..

5 Answers 167 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sreenivas
Top achievements
Rank 1
Sreenivas asked on 22 Jul 2009, 04:06 PM
Hi,

We are using latest version of Teleriks. I want to change the question icon to my own icon on RadConfirm window.

Please note: Telerik.Web.UI.dll is referenced and we are not using skin folder in the root directory of the application

Need a solution to change the icon with out changing in xml file.

Thanks
Sreenivas.

5 Answers, 1 is accepted

Sort by
0
Accepted
Fiko
Telerik team
answered on 27 Jul 2009, 03:00 PM
Hello Sreenivas,

Yes, you just need to add the following CSS declaration in the title tag of the page that contains the RadWindowManager's declaration :

<style type="text/css"
    .rwDialogPopup.radconfirm 
    { 
        background-imageurl('ajax-loader.gif') !important; 
    } 
</style> 

The value that is passed to the url is the path to the image that will replace the standard question image.
I hope this helps.

Greetings,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sreenivas
Top achievements
Rank 1
answered on 27 Jul 2009, 03:06 PM
Thanks for your reply. This works perfectly. Also, I have tried in a different way.

 

<style type="text/css">

 

 

.RadWindow .rwWindowContent .radconfirm

 

{

 

background-image: url('../../images/stop.gif');

 

 

background-position: left top;

 

}

 

</style>


Regards
Sreenivas
Montvale KPMG.

 

0
L
Top achievements
Rank 1
answered on 04 May 2012, 03:45 PM
Hi Fiko,

I know this thread is old but your answer helped me a lot.

Still I have another problem, this is my scenario.
I have to radalert calls in the same page. I want to show the warning icon in one of them, and an information icon in the other one. 

function ShowWarningIcon() {
       radalert(document.getElementById('<%= confirmationMsg.ClientID %>').value, 430, 100, document.getElementById('<%= confirmationTitle.ClientID %>').value, alertCallBackFn, null); return false;
}
 
function ShowInformationIcon() {
       radalert(document.getElementById('<%= confirmationMsg.ClientID %>').value, 430, 100, document.getElementById('<%= confirmationTitle.ClientID %>').value, alertCallBackFn, null); return false;
}


Thanks in advance for your help.
0
Marin Bratanov
Telerik team
answered on 04 May 2012, 04:40 PM
Hi,

I am glad to inform you that since Q1 2012 this feature is supported out of the box by the RadAlert and RadConfirm. You only need to pass the URL to the desired image as the last parameter of the method. You can see it in action in the following online demo: http://demos.telerik.com/aspnet-ajax/window/examples/browserdialogboxes/defaultcs.aspx.
The full syntax is as follows:
radalert(text, oWidth, oHeight, oTitle, callbackFn, imgUrl);

and is explained in this help article: http://www.telerik.com/help/aspnet-ajax/window-dialogs-alert.html.

On older versions you would need to store a reference to the alerts and change the background image via JavaScript, e.g. by using jQuery:
var oAlert = radalert();            
var contentElement = $telerik.$(".radalert", oAlert.get_popupElement());//gets a reference to the content container where the image is set as a background image
contentElement.css("background-image", "url('custom-content-icon.png')");//changes the background image with a custom one



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
L
Top achievements
Rank 1
answered on 07 May 2012, 06:52 PM
Thanks for the reply. This solution didn't work for me. I used Fiko's solution at the end and now all radalerts are showing the same icon.
Tags
Window
Asked by
Sreenivas
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Sreenivas
Top achievements
Rank 1
L
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or