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

Stack Notifications with VisibleOnPageLoad = True

1 Answer 91 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 18 Aug 2011, 01:50 PM
Hi,

I have several Notifications which are activated OnPostback setting VisibleOnPageLoad = True from codebehind.

How do i stack these? They are all shown all in same position now.

Thanks,
Marc

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 19 Aug 2011, 03:25 PM
Hello Marc,

You can use the OffsetY position and set it accordingly: for the second notification it should be the height of the first, for the third it should be the combined height of the first and the second, etc. Here follows a small example:
<telerik:RadNotification runat="server" ID="RadNotification1" Text="I am number 1"
    Width="200px" Height="120px" VisibleOnPageLoad="true">
</telerik:RadNotification>
<telerik:RadNotification runat="server" ID="RadNotification2" Text="I am the second one"
    Width="200px" Height="120px" VisibleOnPageLoad="true" OffsetY="-120">
</telerik:RadNotification>

You could, of course modify this value so that they have some space between them, or overlap, etc

You can also set these properties from the code-behind as well.

  On a side note, you can also call its server-side Show() method instead of setting this property, as if you use the property if another element causes a postback the notifications will reappear, which may not be the desired effect. Well, if it is - no harm done in saying :)


Best wishes,
Marin
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Notification
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or