Overlapping notifications

2 posts, 0 answers
  1. Mark
    Mark avatar
    87 posts
    Member since:
    Jul 2014

    Posted 23 Sep 2015 Link to this post


     I need to be able to show some notifications that auto hide after 5 seconds and others that don't auto hide.  I am achieving this by using this code when I want to show a notification for 5 seconds:


    01.var fadingnotification = $("#fadingnotification").kendoNotification({
    02.    position: {
    03.        pinned: true,
    04.        bottom: 60,
    05.        right: 30
    06.    },
    07.    stacking: "up",
    08.    autoHideAfter: 5000,
    09.    templates: [{
    10.            type: "stickyinfonodismiss",
    11.            template: $("#stickyInfoNoDismissTemplate").html()
    12.        }, {
    13.            type: "stickyinfo",
    14.            template: $("#stickyInfoTemplate").html()
    15.        }, {
    16.            type: "info",
    17.            template: $("#infoTemplate").html()
    18.    }]
    22.    message: msgToDisplay
    23.}, "info");

    and using the same code but with "autoHideAfter: 0" for the ones that I want to display without hiding.

     The problem I have is that this effectively initiates a new notification GUID each time so the notifications start again at the bottom of the screen each time even if there are already notifications on screen.

     Ideally I want to just change the autoHideAfter option without initialising a new notification and therefore a new GUID.

    Any ideas?



  2. Plamen Lazarov
    Plamen Lazarov avatar
    135 posts

    Posted 25 Sep 2015 Link to this post

    Hi Mark,

    It is possible to use a single Notification widget instance and change the autoHideAfter setting on the fly. Please check the approach, which is described in the following documentation section:

    Plamen Lazarov
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET AJAX banner
Back to Top