Show notification on CallBack update

2 posts, 0 answers
  1. Meera
    Meera avatar
    14 posts
    Member since:
    Mar 2012

    Posted 30 Oct 2014 Link to this post

    Is it possible to trigger the notification show() on the call back update function? Especially when the notification was created dynamically.

    RadNotification notification = new RadNotification();
    notification.LoadContentOn = Telerik.Web.UI.NotificationLoad.TimeInterval;  
    notification.UpdateInterval = 20000;
    notification.CallbackUpdate +=_notification_CallbackUpdateOnTime;
     
     
            protected void _notification_CallbackUpdateOnTime(object sender, RadNotificationEventArgs e)
            {
                 if( <some condition>)
                 {
                    ((Telerik.Web.UI.RadNotification)(sender)).Show();
                 }
            }


  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3599 posts

    Posted 30 Oct 2014 Link to this post

    Hello Meera,

    You can use the OnClientUpdated event to show the notification if meaningful information is returned, as shown here: http://demos.telerik.com/aspnet-ajax/notification/examples/updateinterval/defaultcs.aspx.

    The Show() call cannot work during the callback because it has to register a script that will show the notificaiton and this is impossible during a callback.

    It is also important to recreate the notifrication each time the page loads (e..g, in the Page_Init or Page_Load event).


    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top