How To Change Background Image of the RadAlert At Runtime

5 posts, 0 answers
  1. Sairam
    Sairam avatar
    56 posts
    Member since:
    May 2013

    Posted 18 May 2013 Link to this post

    It's in Rad code block ,
    <style
    type="text/css"> .RadWindow .rwWindowContent .radalert { background-image:url("images/InfoImg.png"); } </style>

    The above code is used in my program ,In successful message ,I want to use same Background , But On failure of some condition I want to change to the background image of Radalert(),telerik Default background Image or Custom Warning  Icon for That at code behind technique .help me..plz
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 21 May 2013 Link to this post

    Hello Sairam,

    Changing the icon of the predefined dialog is a feature that comes out of the box now, the last parameter to the method can be used for this.

    You can see it in action here and read the documentation on the subject here. Thus, a single string parameter can replace the CSS you now use.


    Regards,
    Marin Bratanov
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sairam
    Sairam avatar
    56 posts
    Member since:
    May 2013

    Posted 21 May 2013 Link to this post

    What exactly I want ,Not Come here, I am  Give the picture and based on that can you help in client side or server side code.
    Thanks for your replay .

    In the picture your found One back ground image ," blue color"  i ,That is background picture of rad alert ,so  I am ,change the URL  in rad code block "
    <style type="text/css">
                .RadWindow .rwWindowContent .radalert
                {
                    background-image:url("images/InfoImg.png"); 
                }
            </style>
    But I don't want like these I want changes that in server side On failure  or on success. please give snippet.
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 23 May 2013 Link to this post

    Hi again Sairam,

    Please examine carefully the resources I linked you to. They will show you how to change the image without CSS, but from the code that calls the alert. For example:
    if(isError){
       RadWindowManager1.RadAlert("warning", 330, 180, "title", "alertCallBackFn", 'errorImage.png');
    }
    else if(isWarning){
         RadWindowManager1.RadAlert("warning", 330, 180, "title", "alertCallBackFn", 'warningImage.png');
    }



    Regards,
    Marin Bratanov
    Telerik
    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. Sairam
    Sairam avatar
    56 posts
    Member since:
    May 2013

    Posted 24 May 2013 Link to this post

    Thanks  Marin Bratanov ,It's working
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017