RadButton onClick within RadNotification in Web User Control on Site.Master Page

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

    Posted 29 Jul 2014 Link to this post

    Currently working on a project that requires what is effectively being called a "Notification Queue" which is embedded into the Site.Master page in a ASP.NET 4.5 C# environment with Visual Studio 2013 SP 2.

    The Notification Queue is a Web User Control which has 8 RadNotification controls, currently, 7 of the controls are ennumerated RadNotification1 to RadNotification7 for their ID, the 8th RadNotification control has a RadButton, an ASP ImageButton and ASP Label.

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="telNotificationQueue.ascx.cs" Inherits="poetwebapp.Controls.telNotificationQueue" %>
    <script type="text/javascript" >
        function jsAcknowledge(s, e) {
            s.set_autoPostBack(true);
            s.set_commandArgument("All");
            debugger;
            __doPostBack('<%=butAcknowledgeAll.UniqueID%>', 'OnClick');
        }
    </script>
    <telerik:RadNotification ID="radNotification1" runat="server" AutoCloseDelay="0" Height="130" Width="330" ShowCloseButton="true" ShowTitleMenu="false" Skin="Web20" ContentScrolling="Y" VisibleTitlebar="true">
        <ContentTemplate>
        </ContentTemplate>
    </telerik:RadNotification>
    <telerik:RadNotification ID="radNotification2" runat="server" AutoCloseDelay="0" Height="130" Width="330" ShowCloseButton="true" ShowTitleMenu="false" Skin="Web20" ContentScrolling="Y" VisibleTitlebar="true">
        <ContentTemplate>
        </ContentTemplate>
    </telerik:RadNotification>
    <telerik:RadNotification ID="radNotification3" runat="server" AutoCloseDelay="0" Height="130" Width="330" ShowCloseButton="true" ShowTitleMenu="false" Skin="Web20" ContentScrolling="Y" VisibleTitlebar="true">
        <ContentTemplate>
        </ContentTemplate>
    </telerik:RadNotification>
    <telerik:RadNotification ID="radNotification4" runat="server" AutoCloseDelay="0" Height="130" Width="330" ShowCloseButton="true" ShowTitleMenu="false" Skin="Web20" ContentScrolling="Y" VisibleTitlebar="true">
        <ContentTemplate>
        </ContentTemplate>
    </telerik:RadNotification>
    <telerik:RadNotification ID="radNotification5" runat="server" AutoCloseDelay="0" Height="130" Width="330" ShowCloseButton="true" ShowTitleMenu="false" Skin="Web20" ContentScrolling="Y" VisibleTitlebar="true">
        <ContentTemplate>
        </ContentTemplate>
    </telerik:RadNotification>
    <telerik:RadNotification ID="radNotification6" runat="server" AutoCloseDelay="0" Height="130" Width="330" ShowCloseButton="true" ShowTitleMenu="false" Skin="Web20" ContentScrolling="Y" VisibleTitlebar="true">
        <ContentTemplate>
        </ContentTemplate>
    </telerik:RadNotification>
    <telerik:RadNotification ID="radNotification7" runat="server" AutoCloseDelay="0" Height="130" Width="330" ShowCloseButton="true" ShowTitleMenu="false" Skin="Web20" ContentScrolling="Y" VisibleTitlebar="true">
        <ContentTemplate>
        </ContentTemplate>
    </telerik:RadNotification>
    <telerik:RadNotification ID="RadNotificationQueueCommands" runat="server" AutoCloseDelay="0" Height="35" Width="330" ShowCloseButton="false" LoadContentOn="TimeInterval" UpdateInterval="120" VisibleOnPageLoad="false" VisibleTitlebar="false" >
        <ContentTemplate>
        <div style="padding-top:5px; padding-bottom:5px; padding-left:5px;">
           <telerik:RadButton ID="butAcknowledgeAll" runat="server" Text="Acknowledge All" AutoPostBack="true" OnClientClicked="jsAcknowledge" OnClick="RadButton1_Click" OnCommand="butAcknowledgeAll_Command" UseSubmitBehavior="true" CommandName="AcknowledgeAll" CausesValidation="false">
        </telerik:RadButton>
                  <asp:ImageButton ID="ibtRefreshList" runat="server" ImageUrl="~/Images/refresh_icon.png" Style="padding-top:3px;" />
                    <asp:Label ID="lblWaitingNotifications" runat="server" Text="# Notifications"></asp:Label>
        </div>
        </ContentTemplate>
    </telerik:RadNotification>


    The RadButton OnClick (Server-side) Event is not being fired by the current code. The OnClientClicked event does run the jsAcknowledge function but the stop points within Visual Studio 2013 SP 2 are not being triggered - these stop points are:
    protected void RadButton1_Click(object sender, EventArgs e) { fnProcessForm(); }
    protected void butAcknowledgeAll_Command(object sender, CommandEventArgs e) { fnProcessForm(); }

    So, this would indicate that the OnClick event is not being triggered and this event does need to be able to fire since the server-side code will contain an SQL UPDATE command /transaction. Recommendations?

    The fnProcessForm() function displays the appropriate number of messages on the screen for the user and updates the Label to indicate the overall number of waiting messages for the user. The attached file displays an example of the layout.

  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 30 Jul 2014 Link to this post

    Hi James,

    I have already replied to the support ticket that you have opened on this regard and I paste my answer below:

    I wasn't able to reproduce the issue with the provided example. You can watch the short video test in the attached archive and then tell me what I am missing.

    Note that as long as the postback of the button is not disabled it is not necessary to explicitly click the button. Therefore I have commented __doPostback() method out.

    Could you please try to reproduce the issue with the attached VS example and then send it back to me, so that I can proceed further with the examination?



    Regards,
    Danail Vasilev
    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