Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
expand child nodes on clicking the parent node text without page refresh
posted

I have the following code for displaying the tabs, on clicking the arow icon expands the child tabs but when I click on the text it refresh the page. I want it not to refresh the page when clicked on parent node.

I am new to ASP and infragistics any guidence would be much appresiated.

<ul class="navigation">
<li class="rptHeading">Reports</li>
<li>
<ig:WebDataTree ID="WebDataTree1" runat="server" OnNodeClick="WebDataTree1_NodeClick" ViewStateMode="Enabled" EnableExpandOnClick="true">
<AutoPostBackFlags NodeClick="On" />
<Nodes>
   <ig:DataTreeNode Text="parent tab1">
   <Nodes>
       <ig:DataTreeNode Text="child1" Value="child1"></ig:DataTreeNode>
      <ig:DataTreeNode Text="child2" Value="child2"></ig:DataTreeNode>
  </Nodes>
</ig:DataTreeNode>
<ig:DataTreeNode Text="Parent tab2">
   <Nodes>
    <ig:DataTreeNode Text="child1" Value="child1"></ig:DataTreeNode>
    <ig:DataTreeNode Text="child2" Value="child2"></ig:DataTreeNode>
</Nodes>
</ig:DataTreeNode>
</Nodes>
</ig:WebDataTree>
</li>
</ul>

  • 1100
    Offline posted

    Hello Said,

    Thank you for contacting the infragistics support!

    The reason for the postback that you observe is that you have set  

    <AutoPostBackFlags NodeClick="On" />

    If you remove the "NodeClick" flag, the page will not refresh when a node is clicked. Is there a reason for you to enable this flag? If it is so - please provide more information about the scenario that you want to execute.

    Best regards,

    Alexander