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

RadNotification in Custom Control

1 Answer 126 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Dimitrios
Top achievements
Rank 1
Dimitrios asked on 14 Jan 2015, 10:30 AM
I have two custom controls (A and B) on same page, corresponding to two radgrids.

Both .ascx files of these controls include:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
</telerik:RadWindowManager>

<telerik:RadNotification ID="n1" runat="server" Text="" Position="Center"
  AutoCloseDelay="5000" Width="450" Title="" KeepOnMouseOver="true"
  EnableRoundedCorners="true" Animation="Resize" ContentIcon="warning"
  AnimationDuration="700" TitleIcon="none" Font-Size="12px" Font-Bold="True"
  ShowCloseButton ="true">
</telerik:RadNotification>


...and in both .vb files I am using the following code to flash a message:

n1.Title = "Error Adding"
n1.Text = "Must have valid or non-Zero received qty!"
n1.Show()

What would be the possible reasons for the messages to come out empty (the window opens with no message) in only one of the custom controls?

In other words...
In all cases, where the message is generated in custom control A, it comes out fine.
In all cases, where the message is generated in custom control B, it comes out EMPTY.


Thanks for your time...

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 14 Jan 2015, 11:02 AM

Hi Dimitrios,

I have moved your thread to the RadNotification forum and I would advise that you post your questions in the most relevant place, as this will facilitate getting a better response.

As for the issue - most likely, the problem is related to the AJAX setup. To update a server property and have that change reflect on the client, the control in question must be part of the partial page rendering. Thus, if in the problematic user control, the notification is not updated on the client, it will come up empty.

Note that AJAX settings may not necessarily be in the user control, it is possible that they are applied to the parent elements of the user control.

Apart from that, one idea I can offer is using the Show("new text") override of the method that does not require that you update the notification with AJAX. You can see it in action here: http://demos.telerik.com/aspnet-ajax/notification/examples/servershowwithnewtext/defaultcs.aspx. Note that, to change the Title, you would still need to update the control with AJAX. Thus, you can consider using a static title and icons, if this fits your needs.


Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Notification
Asked by
Dimitrios
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or