RadNotification in Custom Control

2 posts, 0 answers
  1. Dimitrios
    Dimitrios avatar
    45 posts
    Member since:
    Jun 2014

    Posted 14 Jan 2015 Link to this post

    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...
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 14 Jan 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top