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

Notification Content doesnt update

2 Answers 79 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 16 Jan 2012, 03:08 PM
Hi, I have a snippet like this
function ShowSuccessNotificationMessage(title, message) {
            var notifObject = $find("<%=RadNotification.ClientID %>");
            notifObject.set_title(title);
            notifObject.set_text(message);
            notifObject.show();
It works with 3.5 NET framework, but, I updated to 4.0, and doesn't work anymore.
I have the Telerik2011Q2 version

Notification markup is setted with LoadContentOn="EveryShow" (but I didn't need that property in 3.5).
Any idea?

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 17 Jan 2012, 02:54 PM
Hi Martin,

What exactly is not working in this case? If the controls is properly configured to update itself (e.g. either the OnCallBackUpdate or a WebService) things should work properly. I tried with the below code and things were working as expected with me: http://screencast.com/t/Y9a4hwqCLW. Also please note that the ID of the control should be different than its class name, e.g. RadNotification1. Please also note that if the notification updates its content automatically the text you set via JavaScript will be overwriten by the content received from the server.
<telerik:RadNotification runat="server" ID="RadNotification1" OnCallbackUpdate="OnCallbackUpdate"
    LoadContentOn="EveryShow" Position="Center" Width="250px" Height="120px">
</telerik:RadNotification>
<asp:Button ID="Button1" Text="update notification" OnClientClick="ShowSuccessNotificationMessage('test title', 'some message'); return false;"
    runat="server" />

function ShowSuccessNotificationMessage(title, message)
{
    var notifObject = $find("<%=RadNotification1.ClientID %>");
    notifObject.set_title(title);
    notifObject.set_text(message);
    notifObject.show();
}

protected void OnCallbackUpdate(object sender, Telerik.Web.UI.RadNotificationEventArgs e)
{
    RadNotification1.Text = DateTime.Now.ToString();
}

I also advise that you upgrade to the latest version, as there have been some fixes on the RadNotification control and they may help you, as I am not sure exactly what and how you are using.

Greetings,
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
0
Martin
Top achievements
Rank 1
answered on 17 Jan 2012, 02:59 PM
Thanks, it's solved, I changed to Q3, and also replace dll's, I didn't do that before and I wasn't using the correct dll for framework 4.
Tags
Notification
Asked by
Martin
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Martin
Top achievements
Rank 1
Share this question
or