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

Show notification on CallBack update

1 Answer 134 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Meera
Top achievements
Rank 1
Meera asked on 30 Oct 2014, 12:58 PM
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();
             }
        }


1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 30 Oct 2014, 02:01 PM

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.

 
Tags
Notification
Asked by
Meera
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or