Hello,
I seem to be having a problem with a radtreeview scenario and it is kind of putting my project to a halt right now.
I have a radtreeview with AppendDataBoundItems="true". in the markup I include one node by default - with a node template.
i also bind the treeview with several more nodes (which are appended) and have a DIFFERENT NodeTemplate.
I need to access the controls in the first node from code-behind, so in my page_load event I find the control and assign it to a protected page variable.
This loads and works fine on page load. Unfortanately, when I try to update the control via ajax - during the page_load it seems to have assigned the wrong template to the first node (it assigns the data-bound template instead).
as a result, the control that I need does not exist, and there is an error, and the ajax request never completes.
how can I get this to work across multiple updates?
the markup for the treeview:
<telerik:RadTreeView ID="RadTreeView1" runat="server" DataFieldID="ID" DataFieldParentID="ParentID" MultipleSelect="true" EnableDragAndDrop="true" OnClientDoubleClick="onNodeDoubleClick" OnClientNodeClicked="onNodeClick" EnableDragAndDropBetweenNodes="true" ShowLineImages="true" OnClientContextMenuItemClicking="onClientContextMenuItemClicking" OnClientNodeExpanded="onNodeExpanded" OnClientContextMenuShowing="onClientContextMenuShowing" Skin="dsSkin" EnableEmbeddedSkins="False" AppendDataBoundItems="true"> <Nodes> <telerik:RadTreeNode Text="Document Date" Value="dateslider" > <NodeTemplate>Document Date</NodeTemplate> <Nodes> <telerik:RadTreeNode Value="datesliderchild" > <NodeTemplate> <%-- Node Template with control which I need to access AFTER ajax requests --%> <telerik:RadSlider runat="server" ID="radSliderDates" IsSelectionRangeEnabled="true" Width="250" AutoPostBack="true" ShowDecreaseHandle="false" ShowIncreaseHandle="false" OnClientValueChanging="onClientValueChanging" OnClientSlideStart="onClientSlideStart" OnClientSlideEnd="onClientSlideEnd" OnClientSlide="onClientSlide" /> </NodeTemplate> </telerik:RadTreeNode> </Nodes> </telerik:RadTreeNode> </Nodes> <NodeTemplate> <%-- Global Node Template which I apply to data-bound items --%> </NodeTemplate></telerik:RadTreeView>protected void Page_Load(object sender, EventArgs e){ #region Load Event Handlers //Find node I am looking for - then assign controls to protected page variables. //On postbacks/ajax requests, the node is found, but the FindControl method does not find anything because the node has the wrong template RadTreeNode node = RadTreeView1.FindNodeByValue("datesliderchild"); radSliderDates = (RadSlider)node.FindControl("radSliderDates"); lblSliderEndDate = (Label)node.FindControl("lblSliderEndDate"); lblSliderStartDate = (Label)node.FindControl("lblSliderStartDate"); radSliderDates.ValueChanged += new EventHandler(radSliderDates_ValueChanged); #endregion if (!IsPostBack) { }}ANY help on this is much appreciated!