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

Set Title/Content icon on client

5 Answers 193 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Jamie Lea
Top achievements
Rank 1
Jamie Lea asked on 11 Aug 2011, 01:09 PM
Hi,

Anyone know if this is possible?

Cheers,
Jamie

5 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 12 Aug 2011, 01:14 PM
Hello Jamie,

    This is currently not possible via the RadNotification's Client-side API, as the images are embedded in the control during its rendering on the server. Nevertheless you can modify them via JavaScript, like you would any other element. A simple example can be found in the attached page. You can use it as basis to develop your desired functionality. I have also created a PITS item for this feature which you can monitor in the following Public URL. If enough votes are accumulated this feature will be implemented in a future release.


Regards,
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
Sean
Top achievements
Rank 2
answered on 10 Oct 2011, 10:02 PM
Hi Marin,

Thank you for the example you have provided. I went ahead +1'ed the vote count on this issue.

However, I have a question. If one was looking to change the icons between the Telerik-provided icons -- how would one do this? Merely using "warning.png" inside of the example you provided does not implicitly direct to the embedded icon. I don't have a path to this icon, though, as it is embedded with Telerik resources, as far as I can tell. 
0
Marin Bratanov
Telerik team
answered on 11 Oct 2011, 03:58 PM
Hi Sean,

Please examine the following KB article: http://www.telerik.com/support/kb/aspnet-ajax/notification/using-the-built-in-icons-with-a-custom-skin.aspx. It shows a way to extract the URL of the embedded icons from the assembly. Please note that this will work from Q2 2011 SP1 forward. After you obtain the URL you can either store it in a hidden field or hidden image, or update the notification with AJAX to update the icons, etc.


Best wishes,
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
SALVATORE
Top achievements
Rank 1
answered on 01 Dec 2016, 04:05 PM

Hi

I have Q3/2016 and I do not find more rnContentIconClip and rnTitleBarIcon. Now, I see there is a css class to do this: rnIconok, rnIcondelete, ...

How can I change icons now by javascript?

Thanks in advance.

0
Marin Bratanov
Telerik team
answered on 01 Dec 2016, 04:37 PM

Hi Salvatore,

It seems your notification uses the Lightweight Render Mode: http://docs.telerik.com/devtools/aspnet-ajax/controls/notification/mobile-support/render-modes. This mode uses font icons that are applied through a few classes (e.g., rnIconOk, as you found). You can toggle those classes via jQuery easily to switch the built-in icons, or you can add your own class and use your own icon.

Regards,

Marin Bratanov
Telerik by Progress
Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
Tags
Notification
Asked by
Jamie Lea
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Sean
Top achievements
Rank 2
SALVATORE
Top achievements
Rank 1
Share this question
or