Set Title/Content icon on client

6 posts, 1 answers
  1. Jamie Lea
    Jamie Lea avatar
    3 posts
    Member since:
    Jul 2008

    Posted 11 Aug 2011 Link to this post

    Hi,

    Anyone know if this is possible?

    Cheers,
    Jamie
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3597 posts

    Posted 12 Aug 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sean
    Sean avatar
    200 posts
    Member since:
    Nov 2010

    Posted 10 Oct 2011 Link to this post

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

    Posted 11 Oct 2011 Link to this post

    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
  6. SALVATORE
    SALVATORE avatar
    3 posts
    Member since:
    May 2016

    Posted 4 days and 18 hours ago Link to this post

    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.

  7. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3597 posts

    Posted 4 days and 18 hours ago Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017