Hello,
I have a couple of issues with my new message notification. First, calling the code-behind .show() method in the CallBackUpdate event does not seem to do anything. I had to use the javascript method shown in the Notification / Update on interval demo, and that works.
Secondly and more importantly, when the notification is displayed, normally it disappears after the AutoCloseDelay (7 secs) has elapsed. This is fine, unless the user mouses over the notification if they want to read it longer. The notification itself remains, but after the UpdateInterval (10 secs) elapses, the .Text value of the LinkButton control in the ContentTemplate is wiped out. Does it not persist in the viewstate? Not sure how to work around this. Once the notification is shown, the data is flagged as such so that it does not show again.
Thanks,
Dan
I have a couple of issues with my new message notification. First, calling the code-behind .show() method in the CallBackUpdate event does not seem to do anything. I had to use the javascript method shown in the Notification / Update on interval demo, and that works.
Secondly and more importantly, when the notification is displayed, normally it disappears after the AutoCloseDelay (7 secs) has elapsed. This is fine, unless the user mouses over the notification if they want to read it longer. The notification itself remains, but after the UpdateInterval (10 secs) elapses, the .Text value of the LinkButton control in the ContentTemplate is wiped out. Does it not persist in the viewstate? Not sure how to work around this. Once the notification is shown, the data is flagged as such so that it does not show again.
Thanks,
Dan
<script type="text/javascript">function OnClientUpdated(sender, args) { var newMsgs = sender.get_value(); if (newMsgs != 0) { sender.show(); }} </script><telerik:RadNotification ID="RadNotification1" runat="server" Width="330px" Height="75px" OnClientUpdated="OnClientUpdated" ContentIcon="" TitleIcon="~/App_Themes/MainTheme/images/message_16.png" Title="New Message(s)" LoadContentOn="TimeInterval" UpdateInterval="10000" Animation="Fade" AutoCloseDelay="7000" OffsetX="-10" OffsetY="-35"> <ContentTemplate> <asp:LinkButton ID="lbNotification" runat="server" PostBackUrl="~/Messages.aspx" CssClass="msg"></asp:LinkButton> </ContentTemplate></telerik:RadNotification>Protected Sub RadNotification1_CallbackUpdate(sender As Object, e As Telerik.Web.UI.RadNotificationEventArgs) Handles RadNotification1.CallbackUpdate Dim MsgFrom As String = "" Dim Regarding As String = "" Dim Message As String = "" If CheckForMessages(MsgFrom, Regarding, Message) Then Message = Replace(Message, "<br>", " ") Message = IIf(Len(Message) > 60, Left(Message, 60) & "...", Message) lbNotification.Text = "<b>" & MsgFrom & "</b><br>" & _ Regarding & "<br>" & _ Message RadNotification1.Value = 1 Else RadNotification1.Value = 0 End IfEnd Sub