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

Remove radalert icon

12 Answers 602 Views
Window
This is a migrated thread and some comments may be shown as answers.
Fakhrul
Top achievements
Rank 1
Fakhrul asked on 17 Feb 2009, 03:31 PM
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

12 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 18 Feb 2009, 05:58 AM
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
0
Martin
Telerik team
answered on 18 Feb 2009, 06:34 AM
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.
0
Garry
Top achievements
Rank 2
Veteran
answered on 04 Nov 2010, 01:40 PM
Using VS2010 and ie8 and latest telerik and this technique is NOT working - any idea why?
0
Georgi Tunev
Telerik team
answered on 10 Nov 2010, 04:08 PM
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
0
Afroz
Top achievements
Rank 1
answered on 04 Mar 2011, 02:58 PM
Hi Georgi

Can you please tell me where i put this Css class
0
Georgi Tunev
Telerik team
answered on 04 Mar 2011, 03:59 PM
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!
0
alin
Top achievements
Rank 1
answered on 05 Aug 2011, 10:51 AM

 

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?
0
Marin Bratanov
Telerik team
answered on 08 Aug 2011, 11:17 AM
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.

0
mirang
Top achievements
Rank 1
answered on 21 Feb 2012, 12:03 PM
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 ?
0
Svetlina Anati
Telerik team
answered on 23 Feb 2012, 01:40 PM
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.
0
G
Top achievements
Rank 1
answered on 21 Apr 2014, 10:15 AM
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
0
Princy
Top achievements
Rank 2
answered on 22 Apr 2014, 05:16 AM
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.
Tags
Window
Asked by
Fakhrul
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Martin
Telerik team
Garry
Top achievements
Rank 2
Veteran
Georgi Tunev
Telerik team
Afroz
Top achievements
Rank 1
alin
Top achievements
Rank 1
Marin Bratanov
Telerik team
mirang
Top achievements
Rank 1
Svetlina Anati
Telerik team
G
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or