RADConfirm Src icon change..

6 posts, 1 answers
  1. Sreenivas
    Sreenivas avatar
    12 posts
    Member since:
    Jul 2008

    Posted 22 Jul 2009 Link to this post

    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.
  2. Answer
    Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 27 Jul 2009 Link to this post

    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.
  3. Sreenivas
    Sreenivas avatar
    12 posts
    Member since:
    Jul 2008

    Posted 27 Jul 2009 Link to this post

    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.

     

  4. L
    L avatar
    29 posts
    Member since:
    Mar 2012

    Posted 04 May 2012 Link to this post

    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.
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5811 posts

    Posted 04 May 2012 Link to this post

    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.
  6. L
    L avatar
    29 posts
    Member since:
    Mar 2012

    Posted 07 May 2012 Link to this post

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