0
I have the following updatePanel:
<asp:ScriptManager ID="ScriptManager1" runat="server" ChildrenAsTriggers="true" >
        <Scripts>
        </Scripts>
    </asp:ScriptManager>
    <asp:UpdatePanel ID="panelTreeView" runat="server"   UpdateMode="Conditional"> 
          <ContentTemplate>
<div class="easy-tree">
     <asp:TreeView  ID="TreeView1" runat="server" ImageSet="Arrows" ForeColor="Black"     OnSelectedNodeChanged="TreeView1_SelectedNodeChanged" >
         <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
         <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black"     HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="0px" />
         <ParentNodeStyle Font-Bold="False" />
     <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" BackColor="#E2D2D2"                         HorizontalPadding="0px" VerticalPadding="0px" />
</asp:TreeView>
    </div>
              </ContentTemplate>
    </asp:UpdatePanel>
I want to update treeview at a certain time.
Codebhind method:
public metodoQualquer(){
this.panelTreeView.Update();
}
But nothing happens.
Your code does not demonstrate who the update Rigger is, you put Updatemode="Conditional", so something needs to trigger the update. You did not notify that your children are triggers, you did not set a Rigger and updatePanel does not have an updatePanel parent to update, so there is no set trigger for this updatePanel.
– Malkaviano
What about it? I put Childrenastriggers="true" but nothing yet.
– War Lock
Then first update the question code, then take advantage and put the Onselectednodechanged code="Treeview1_selectednodechanged". No use calling update if the component has no new information to display.
– Malkaviano
updated, but my way does something. creates a new Ode, every time I have to press F5, or a redirect.
– War Lock
You have put in the wrong man element, it is in updatepanel and not in scriptmanager. Put the postback event code too.
– Malkaviano
I’ve never seen put Childrenastriggers="true" inside the Scriptmanager, why don’t you take it out and try.
– Marconi
@Marconi I was the one who explained to him that there was no Rigger in updatepanel, he chose this Rigger, but put in the wrong place.
– Malkaviano
@Malkaviano Feel free to post the answer! You should put it in the answer not in the comment.
– Marconi