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>
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
When someone click on the child tab I get the value of the clicked tab and getting the data from the db but on the parent tab I don't want to postback
switch (this.Label1.Text) { case "child1": AssignDataSource(gq.child1(some arguments), exportExcel); break; case "child2": AssignDataSource(gq.child2(some arguments), exportExcel); break;}