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

Notification Closes automatically

6 Answers 322 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Miguel
Top achievements
Rank 1
Miguel asked on 09 Jan 2012, 06:50 PM
I have 2 Rad notification in my project. One i'll show on success and i set it to auto close in 5 seconds. The other one i want it to show the error message and only close if the client did it manually, like this:

ErrorNotification.Text = msg;
ErrorNotification.Title = "Error";
ErrorNotification.ContentIcon = "warning";
ErrorNotificaton.ShowCloseButton = true;
ErrorNotification.Show();

but when i test this, the notification appears for about 3/4 seconds then closes itself. I then noticed that if the mouse is over the notification, it doesn't disappear...

Thanks in advance!

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Jan 2012, 05:56 AM
Hello Miguel,

Try setting set_autoCloseDelay which sets delay in milliseconds for the notification to close automatically as explained in this documentation.

-Shinu.
0
Accepted
Svetlina Anati
Telerik team
answered on 10 Jan 2012, 10:19 AM
Hi Miguel,

I see that you are using server-side configuration and thus I suggest to set the AutoCloseDelay property on the server as follows:

 

Copy Code
 
  
ErrorNotification.Text = msg;
  
ErrorNotification.Title = "Error";
  
ErrorNotification.ContentIcon = "warning";
 ErrorNotificaton.ShowCloseButton = true;
 
ErrorNotification.AutoCloseDelay = 0;
  
ErrorNotification.Show();

You could alternatively set it directly in the markup.

The property itself determines after what amount of milliseconds the notification will automatically close (the default is 3000 millisecond). If you set it to 0, the notification will not close automatically and you will control when this should happen.

You can directly test the property and the results when different values are set in our online demo below:


I hope that my reply is detailed enough and helpful, let me know how it goes.


Kind regards,
Svetlina Anati
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
Miguel
Top achievements
Rank 1
answered on 10 Jan 2012, 12:24 PM
It worked!

Thanks
0
Miguel
Top achievements
Rank 1
answered on 10 Jan 2012, 01:55 PM
I have a bug now....

function show_ErrorNotification(errormsg) {
  var ErrorNotification = $find("<%= ErrorNotification.ClientID %>");
  ErrorNotification.set_text(errormsg);
  ErrorNotification.show();
};

but the text isn't set... I've found a thread where it's reported this bug, but on the same thread it says that the bug has been resolved in a later build. I believe i have the final version....

Any thoughts?

Thanks in advance!
0
Accepted
Svetlina Anati
Telerik team
answered on 11 Jan 2012, 10:19 AM
Hi Miguel,

Indeed, there was such an issue which is fixed. I tested the method and it worked fine. Would please recheck your version of RadControls?  In case the problem persists  it is most probably related to some configuration or usage of appropriate events on your side and I will really need to examine some fully runnable reproduction code. Please, provide such along with detailed explanations and reproduction steps and I will fix it for you so that you will be then able to apply the same logic in your original application.

All the best,
Svetlina Anati
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
Miguel
Top achievements
Rank 1
answered on 11 Jan 2012, 12:13 PM
I've solved the problem by using < content template > :)

Thanks for the help !
Tags
Notification
Asked by
Miguel
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Svetlina Anati
Telerik team
Miguel
Top achievements
Rank 1
Share this question
or