Hi,
Im using the latest version of the prometheus controls. I've come across a problem where a radtextbox does not fire the textchanged event all the time.
I've managed to reproduce the problem on a simple page as follows:
The code behind:
The autopostback will work the first time you change the text for both text boxes. The next time you try to change it, it will not fire, and it will also revert back to the old text that existed in the textbox.
Thanks,
Im using the latest version of the prometheus controls. I've come across a problem where a radtextbox does not fire the textchanged event all the time.
I've managed to reproduce the problem on a simple page as follows:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadTextboxAutoPostbackBug.aspx.cs" Inherits="RadTextboxAutoPostbackBug" %> |
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
<!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>Untitled Page</title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<div> |
<telerik:radtextbox id="RadTextBox1" runat="server" autopostback="True" ontextchanged="RadTextBox1_TextChanged" |
textmode="SingleLine" width="125px"></telerik:radtextbox> |
<telerik:radtextbox id="RadTextBox2" runat="server" autopostback="True" ontextchanged="RadTextBox2_TextChanged"></telerik:radtextbox> |
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></div> |
<telerik:radajaxmanager id="RadAjaxManager1" runat="server" defaultloadingpanelid="RadAjaxLoadingPanel1"><AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="RadTextBox1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="Label1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="RadTextBox2"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="Label1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:radajaxmanager> |
<telerik:radajaxloadingpanel id="RadAjaxLoadingPanel1" runat="server" height="75px" |
width="75px"> |
<img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' alt="Loading..." style="border:0px;" /> |
</telerik:radajaxloadingpanel> |
</form> |
</body> |
</html> |
The code behind:
using System; |
using System.Data; |
using System.Configuration; |
using System.Collections; |
using System.Web; |
using System.Web.Security; |
using System.Web.UI; |
using System.Web.UI.WebControls; |
using System.Web.UI.WebControls.WebParts; |
using System.Web.UI.HtmlControls; |
public partial class RadTextboxAutoPostbackBug : System.Web.UI.Page |
{ |
protected void Page_Load(object sender, EventArgs e) |
{ |
} |
protected void RadTextBox1_TextChanged(object sender, EventArgs e) |
{ |
Label1.Text = DateTime.Now.ToString() + ": TextBox1 Changed"; |
} |
protected void RadTextBox2_TextChanged(object sender, EventArgs e) |
{ |
Label1.Text = DateTime.Now.ToString() + ": TextBox2 Changed"; |
} |
} |
The autopostback will work the first time you change the text for both text boxes. The next time you try to change it, it will not fire, and it will also revert back to the old text that existed in the textbox.
Thanks,