I've encountered a strange phenomenon that I do not understand. It concerns this web page, which uses the Telerik RadTreeView:
Imagine you're in the Description textbox, change the value to something else, and then click on another node in the treeview. When this occurs, textBoxDescription_TextChanged gets fired twice. The first time the treeview's SelectedNode is the original one. The second time the treeview's SelectedNode is the one you clicked on.
Why is the clicking of the treeview causing the textbox's TextChanged event to be fired twice in succession?
In case it matters, both controls reside within the same AJAX UpdatePanel. Here are the layout definitions of these two controls:
<rad:RadTreeView ID="treeViewMain" runat="server"
RetainScrollPosition="true"
ExpandDelay="5"
ShowLineImages="true"
OnNodeExpand="treeView_NodeExpand"
OnNodeClick="treeViewMain_NodeClick"
MultipleSelect="false"
AllowNodeEditing="false"
AutoPostBack="true"
Height="500px" Width="350px"
style="background-color:#F0F8FF"
/>
<asp:TextBox ID="textBoxDescription" runat="server" Width="214px" onfocus="SelectText(this)" OnTextChanged="textBoxDescription_TextChanged" />
Any help would be much appreciated!
Robert