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

Can the Notification be positioned within a given container with appendTo

2 Answers 511 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 27 Mar 2015, 03:56 AM
Hi,

I have a series of tabs in my interface, and notifications belong in each.
So for this, I really need to insert my notification into the DOM of the TAB (which has it's own HTML content) - in order to show it "within that area"

Is this what the "appendTo" method is supposed to be used for?
I realize it says "Defines the element to which the notifications will be appended or prepended"
But why would you use it?

I'm asking because I cannot seem to get appendTo working, when I use it, my notification doesn't appear at all, and I just need a sanity check as to whether I should be bothering to use this to "position" the notification in the first place.

2 Answers, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 27 Mar 2015, 03:58 AM
Incidentally, if position property in Notification worked like jQuery's position (which takes an element to position near to, rather than absolute coordinates, then that would probably be perfect.
0
Dimo
Telerik team
answered on 30 Mar 2015, 03:50 PM
Hi Peter,

Yes, the appendTo property of the Notification widget is designed to be used when you want to show the notification messages inside a desired container.

Note that in this case the messages are not popups, i.e. they are simple static elements rendered where you have specified.

http://demos.telerik.com/kendo-ui/notification/index

http://docs.telerik.com/kendo-ui/web/notification/overview#static-messages

If the messages do not appear at all, try setting the "autoHideAfter" property to zero, so that they do not disappear, and try to locate them in the DOM via the browser's DOM inspector. There may be some custom CSS styles, which interfere.

Send a runnable example if you need further assistance with this.

===

If you want to use appendTo, and position the notification messages, then you cannot use the widget's position property, but you can still apply custom positioning-related CSS styles to the notification messages (.k-notification elements). However, a more commonsense approach in this scenario is to position the container in which the messages are rendered, instead of the messages themselves.

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Notification
Asked by
Peter
Top achievements
Rank 1
Answers by
Peter
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or