Remove radalert icon

13 posts, 1 answers
  1. Fakhrul
    Fakhrul avatar
    26 posts
    Member since:
    Aug 2008

    Posted 17 Feb 2009 Link to this post

    Hi,
    I do not want to show radalert icon when I use it to show some message. How can I do this?

    Thanks in advance.

    Mamun
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Feb 2009 Link to this post

    Hi Fakhrul,

    I have added style shown below, in order to hide the default icon in RadAlert and it is working fine for me.

    CSS:
    <style type="text/css"
    div.radwindow_Default .windowcontent .windowpopup.radalert 
        background:none !important; 
    </style> 

    Thanks,
    Shinu
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Martin
    Admin
    Martin avatar
    585 posts

    Posted 18 Feb 2009 Link to this post

    Hi Shinu,

    The approach that Shinu has used is the correct one. You can use it without any concerns.

    All the best,
    Martin Ivanov
    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.
  5. Garry
    Garry avatar
    43 posts
    Member since:
    Sep 2012

    Posted 04 Nov 2010 Link to this post

    Using VS2010 and ie8 and latest telerik and this technique is NOT working - any idea why?
  6. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 10 Nov 2010 Link to this post

    Hi Garry,

    The CSS is for Q3 2008 while you are using Q2 2010 - there were some changes made to the dialog skinning during this period.
    With the current version you could use the following style

    .radalert
    {
        background:none !important;
    }

    but I would recommend to use a custom alert template (where you can remove completely the icon from the code) instead - more info is available here. This way you will ensure that such changes would not affect the content of the dialog.

    Greetings,
    Georgi Tunev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Afroz
    Afroz avatar
    1 posts
    Member since:
    Mar 2011

    Posted 04 Mar 2011 Link to this post

    Hi Georgi

    Can you please tell me where i put this Css class
  8. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 04 Mar 2011 Link to this post

    Hello Afroz,

    This is a CSS selector that should be placed on the same page where the RadWindowManager is.
    e.g.

    <head id="Head1" runat="server">
        <title></title>
        <style type="text/css">
            .radalert
            {
                background: none !important;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <script type="text/javascript">
     
            function showWin()
            {
                radalert("test");
            }
         
        </script>
        <button onclick="showWin(); return false;">
            Show RadWindow</button>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        </telerik:RadWindowManager>
        </form>


    Regards,
    Georgi Tunev
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  9. alin
    alin avatar
    6 posts
    Member since:
    Jul 2011

    Posted 05 Aug 2011 Link to this post

     

    Hello,
    I used this code

    .radalert

    {

    background: none !important;

    }

    .radconfirm

    {

    background: none !important;

    }

    </style>

     

    <!-- content start -->

     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">

     <AjaxSettings>

     <telerik:AjaxSetting AjaxControlID="RadGrid1">

     <UpdatedControls>

     <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />

     </UpdatedControls>

     </telerik:AjaxSetting>

     </AjaxSettings>

     </telerik:RadAjaxManager>

     <telerik:RadWindowManager ID="RadWindowManager1" runat="server" IconUrl=""

     Skin="None">

     </telerik:RadWindowManager>

     <script type="text/javascript">

     function callConfirm() {

     radconfirm(

     'Sunteti sigur?', confirmCallBackFn, 330, 100, null, "Reclamatii 1.0");

     }

     

     function confirmCallBackFn(arg) {

     var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>");

     if (arg) {

     ajaxManager.ajaxRequest(

     'ok');

     }

     

     else {

     ajaxManager.ajaxRequest(

     'cancel');

     }

    }

     </

     script>
    The icon is still displayed. Any idea?

     .radalert ; .radconfirm ; > <!-- content start --> ="RadAjaxManager1_AjaxRequest"> > ="RadGrid1"> > /> > > > > ="" ="text/javascript"> callConfirm() { ); confirmCallBackFn(arg) { ); (arg) { ); { ); >The . Any idea?

    .radalert ; .radconfirm ; > <!-- content start --> ="RadAjaxManager1_AjaxRequest"> > ="RadGrid1"> > /> > > > > ="" ="text/javascript"> callConfirm() { ); confirmCallBackFn(arg) { ); (arg) { ); { ); >The . Any idea?
  10. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 08 Aug 2011 Link to this post

    Hi Alin,

      Your code seems to be working as expected on my end, as you can see in the video I recorded during my tests: http://screencast.com/t/oZy0OrfCGTL. You can find my test page attached as a reference. Please make sure that this is the actual code you are using when you observe this behavior. What I would recommend as well is to clear your browser's cache and rebuild your application in case some settings and CSS have been cached. You can also try using the background-image property and set it to none, as it is a bit more specific:
    .radalert
    {
        background-image: none !important;
    }
    .radconfirm
    {
        background-image: none !important;
    }

    If you are still experiencing difficulties I would advise that you open a support ticket and send us a runnable page that isolates this behavior so we can examine it locally and pinpoint the cause.

    Best wishes,
    Marin
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  11. mirang
    mirang avatar
    115 posts
    Member since:
    Aug 2010

    Posted 21 Feb 2012 Link to this post

    Can we altogether hide the title bar and also prevent the user from moving the alert box. I actually only want to show the alert box without title and the only behavior expected is to close the box. Same as behaviours, we have in radwindow, do we have something simillar in radalert/radconfirm ?
  12. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 23 Feb 2012 Link to this post

    Hi mirang,

     
    You can use the RadWindow client API to modify the alert as you would do with any RadWindow. To allow only Close behavior you should use set_behaviors method. To hide the titlebar (this will, however, hide also the [X] icon along with it), you should call set_visibleTitlebar. Sample script is available below:

    function CallAlert() {
              var oAlert = radalert("Alert", null, null, "Alert");
              //change behaviors, keep titlebar but remove Move
              oAlert.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
              //remove the titlebar at all
              oAlert.set_visibleTitlebar(false);
          }


    On a side note, I am glad to inform you that we implemented an easier way to change or remove the icon by adding an additional optional parameter when calling radalert and radconfirm instead of overriding CSS - a sample updated demo is available below:

    http://demos.telerik.com/aspnet-ajax/window/examples/browserdialogboxes/defaultcs.aspx

    I hope that the provided information on changing behavior and looks are helpful, let me know how it goes.

    Greetings,
    Svetlina Anati
    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.
  13. G
    G avatar
    7 posts
    Member since:
    Jul 2013

    Posted 21 Apr 2014 in reply to Marin Bratanov Link to this post

    Hi Bratanov,

    If I remove image from the radalert it keeps an Empty Space on the left side of the alert . How to remove/adjust the empty space?

    Thanks,

    Gopal
  14. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 22 Apr 2014 in reply to G Link to this post

    Hi G,

    Please try the below CSS to achieve your scenario.

    CSS:
    <style type="text/css">
        .RadWindow .rwWindowContent .radalert
        {
            background: none !important;
        }
        .RadWindow .rwDialogText
        {
            margin-left: -25%;
        }
         
        .RadWindow .rwDialogPopup .rwPopupButton, .RadWindow .rwDialogPopup .rwPopupButton span
        {
            margin-left: -20%;
        }
    </style>

    Thanks,
    Princy.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017