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

RadAjaxManager EventName issue

4 Answers 173 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
dhuss
Top achievements
Rank 1
dhuss asked on 13 Aug 2013, 03:02 PM
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>

4 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 16 Aug 2013, 08:10 AM
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
0
Accepted
Konstantin Dikov
Telerik team
answered on 16 Aug 2013, 10:50 AM
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.
0
Edward Sudit
Top achievements
Rank 1
answered on 27 May 2014, 03:53 PM
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.
0
Konstantin Dikov
Telerik team
answered on 30 May 2014, 10:19 AM
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.

 
Tags
Ajax
Asked by
dhuss
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Konstantin Dikov
Telerik team
Edward Sudit
Top achievements
Rank 1
Share this question
or