RadAjaxManager EventName issue

5 posts, 1 answers
  1. dhuss
    dhuss avatar
    120 posts
    Member since:
    Sep 2009

    Posted 13 Aug 2013 Link to this post

    I have run into an issue with the latest version 2013.2.717.35 when using the eventname property in the radajaxmanager. Using this version and setting an eventname for a control causes a yellow screen of death. See the attached jpg. I have tried this in 3 different projects with all yielding the same result. If I remove the eventname property then all works well. If I revert back to version 417.35, there are no problems using the eventname property. Any suggestions?

    My ajax code:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnTest" EventName="btnTest_Click">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTextBox1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    Event code:
    Private Sub btnTest_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnTest.Click
     
    End Sub

    Controls:
    <telerik:RadTextBox ID="RadTextBox1" runat="server" TabIndex="1" EmptyMessage="Empty">
    </telerik:RadTextBox>
    <telerik:RadButton ID="btnTest" runat="server" AutoPostBack="true" Text="Click">
    </telerik:RadButton>

  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 16 Aug 2013 Link to this post

    Hello,

    Please check the below link. You may get idea how to use EventName in RadAjaxManager.

    http://www.telerik.com/community/forums/aspnet-ajax/ajax/bind-ajaxmanager-to-specific-events.aspx#584543

    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1795 posts

    Posted 16 Aug 2013 Link to this post

    Hi Dennis,

    The "EventName" property in the AjaxSettings was obsolete way back and was reintroduced again in Q2 2013 SP1. Before SP1 the "EventName" property was ignored and no errors would occur if an invalid event name was set.

    Now for your scenario: You are trying to set "btn_Click" as an event name, but RadButton has no such event and that`s the reason for the error. The proper name for the "OnClick" server-side event of RadButton is "Click".

    Please change your AJAX settings with the following:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnTest" EventName="Click">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTextBox1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

     and check how it works for you.

    Best Regards,
    Konstantin Dikov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  5. Edward Sudit
    Edward Sudit avatar
    29 posts
    Member since:
    Aug 2012

    Posted 27 May 2014 in reply to Konstantin Dikov Link to this post

    Unfortunately this property is still not working.  We are currently using version 2004.1.225.45.  When I set the EventName property to "Transferred" for a RadListBox control, the updated controls are still being affected when I just select an item in the list.

    Please advise.
  6. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1795 posts

    Posted 30 May 2014 Link to this post

    Hello Edward,

    I have tested a simple scenario on my end and everything is working correctly with version 2014.1 255. For your convenience, following is the example that I have tested on my end. Please give it a try and see what differs in your scenario:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadListBoxSource" EventName="Transferred">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadListBoxSource" />
                    <telerik:AjaxUpdatedControl ControlID="RadListBoxDestination" />
                    <telerik:AjaxUpdatedControl ControlID="Label1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     
    <telerik:RadListBox runat="server" ID="RadListBoxSource" Height="200px" Width="230px" AutoPostBack="true"
        AllowTransfer="true" TransferToID="RadListBoxDestination" AutoPostBackOnTransfer="true">
        <Items>
            <telerik:RadListBoxItem Text="Argentina"></telerik:RadListBoxItem>
            <telerik:RadListBoxItem Text="Australia"></telerik:RadListBoxItem>
            <telerik:RadListBoxItem Text="Brazil"></telerik:RadListBoxItem>
            <telerik:RadListBoxItem Text="Canada"></telerik:RadListBoxItem>
            <telerik:RadListBoxItem Text="Chile"></telerik:RadListBoxItem>
            <telerik:RadListBoxItem Text="China"></telerik:RadListBoxItem>
        </Items>
    </telerik:RadListBox>
    <telerik:RadListBox runat="server" ID="RadListBoxDestination" Height="200px" Width="200px">
    </telerik:RadListBox>
     
    <asp:Label runat="server" ID="Label1"></asp:Label>

    And the code-behind:
    protected void Page_Load(object sender, EventArgs e)
    {
        Label1.Text = DateTime.Now.ToString(); ;
    }

    As you will notice, the Label is updated only on Transferred event.

    I am looking forward to your reply with the results.


    Regards,
    Konstantin Dikov
    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.

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