Hi-
I'm using a RadAjaxManager with some RadNumericTextBoxes and an asp:Button. The button OnClick and the OnTextChanged are using the RadAjaxManager to update some Labels.
This works fine until I change the value in the RadNumericTextBox and then try to click on the button directly. In this case, it seems to lose the click.
You can reproduce this by:
1) changing the values using the spinner in each of the two rad input boxes to verify that the "lblTotal" label changes.
2) click "OK" to show that the date is updated
3) change a value in one of the RadNumericTextBoxes using the keyboard and then clicking on the OK button directly.
You'll see that the date doesn't update---it's like an event is being lost somewhere. This happens in both Firefox and IE8 on build 2009.02.0826.35.
Any idea what might cause that?
Thanks!
-Mike
I'm using a RadAjaxManager with some RadNumericTextBoxes and an asp:Button. The button OnClick and the OnTextChanged are using the RadAjaxManager to update some Labels.
This works fine until I change the value in the RadNumericTextBox and then try to click on the button directly. In this case, it seems to lose the click.
You can reproduce this by:
1) changing the values using the spinner in each of the two rad input boxes to verify that the "lblTotal" label changes.
2) click "OK" to show that the date is updated
3) change a value in one of the RadNumericTextBoxes using the keyboard and then clicking on the OK button directly.
You'll see that the date doesn't update---it's like an event is being lost somewhere. This happens in both Firefox and IE8 on build 2009.02.0826.35.
Any idea what might cause that?
Thanks!
-Mike
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadAjaxProblem.aspx.cs" |
Inherits="Ajax.RadAjaxProblem" %> |
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head runat="server"> |
<title>Test Ajax</title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="scriptManagerProxy1" runat="server"> |
</asp:ScriptManager> |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="radNumber1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="lblTotal" UpdatePanelRenderMode="Inline" /> |
<telerik:AjaxUpdatedControl ControlID="btnOk" UpdatePanelRenderMode="Inline" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="radNumber2"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="lblTotal" UpdatePanelRenderMode="Inline" /> |
<telerik:AjaxUpdatedControl ControlID="btnOk" UpdatePanelRenderMode="Inline" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="btnOk"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="lblMessage" UpdatePanelRenderMode="Inline" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<div style="margin:50px" > |
<telerik:RadNumericTextBox ID="radNumber1" runat="server" Type="Number" MinValue="1" |
AutoPostBack="true" NumberFormat-DecimalDigits="0" Width="75px" ShowSpinButtons="true" |
Value="1" OnTextChanged="OnNumber1Changed" /> |
plus |
<telerik:RadNumericTextBox ID="radNumber2" runat="server" Type="Number" MinValue="1" |
AutoPostBack="true" NumberFormat-DecimalDigits="0" Width="75px" ShowSpinButtons="true" |
Value="1" OnTextChanged="OnNumber2Changed" /> |
equals |
<asp:Label runat="server" ID="lblTotal"></asp:Label>. |
<p> |
Message: |
<asp:Label ID="lblMessage" runat="server" Text="..."></asp:Label> |
</p> |
<p> |
<asp:Button runat="server" ID="btnOk" OnClick="btnOk_Click" Text="OK" /> |
</p> |
</div> |
</form> |
</body> |
</html> |
using System; |
using Telerik.Web.UI; |
namespace Ajax |
{ |
public partial class RadAjaxProblem : System.Web.UI.Page |
{ |
protected void Page_Load(object sender, EventArgs e) |
{ |
} |
private void UpdateTotal() |
{ |
int arg1 = (int) (radNumber1.Value.HasValue ? radNumber1.Value.Value : 0); |
int arg2 = (int) (radNumber2.Value.HasValue ? radNumber2.Value.Value : 0); |
lblTotal.Text = String.Format("{0}", arg1 + arg2); |
} |
protected void OnNumber1Changed(object sender, EventArgs e) |
{ |
UpdateTotal(); |
} |
protected void OnNumber2Changed(object sender, EventArgs e) |
{ |
UpdateTotal(); |
} |
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) |
{ |
} |
protected void btnOk_Click(object sender, EventArgs e) |
{ |
lblMessage.Text = String.Format("OK clicked at " + DateTime.Now.ToLongTimeString()); |
} |
} |
} |