babybird
asked on
c# .net treeview... double click expanding vs executing further processing
Hi Experts!!
I have a treeview in a winforms c#.net app that I want to on double click expand to the child nodes if they exist, if they don't, it considers it the lowest level and calls a process to generate a report.
Right now I have it calling the process successfully but if it is not the lowest level node and they double click, it will call the process as well and that's not good. So I need to add logic to identify if the selected node has children and if so, just expand to the next level. If not, call the further processing.
I'm not sure how to do that. Can you help me?
I have a treeview in a winforms c#.net app that I want to on double click expand to the child nodes if they exist, if they don't, it considers it the lowest level and calls a process to generate a report.
Right now I have it calling the process successfully but if it is not the lowest level node and they double click, it will call the process as well and that's not good. So I need to add logic to identify if the selected node has children and if so, just expand to the next level. If not, call the further processing.
I'm not sure how to do that. Can you help me?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if(e.Node.Nodes.Count == 0)
runProcess();