سؤال

I am working in Winform app (ticketing app) where people can create support ticket,close etc.

once you select a particular tree node in left pane (either manually or programatically) it's associated control/view gets displayed in right pane of form.

In few scenarios, even though the particular node is getting selected properly (though code) it's associated control not getting displayed/loaded. To brief,

Under root node, I have a open incident, once I close the incident it disappears from opened section and gets added to history section under treeview.

once click on "create incident" button a new tree node gets created with new ticket number and it's associated control gets displayed on right side of form.

So problem is, if I close a open incident and then click on "create incident"; even though new node getting created and it's associated control getting loaded but the control not getting displayed; instead the closed incident view only shown.

Somehow, the new nodes control getting hidden/jammed inside.

I am new to winform/treeview control.I debugged to see if anything going wrong but couldn't find any; neither Google'ng helped me.

Anyone here have any idea what's going wrong (OR) have you faced the same issue. Please help and let me know how to solve it.

PS: Sorry can't post any code and I know without code it's bit difficult to answer but if you can provide any pointer that would help me too.

هل كانت مفيدة؟

المحلول

When you select a treenode and the associated control is not getting loaded, one of four things is probably happening:

  1. The code to view the control is not executed,
  2. The code to view the control is being executed but does not work properly,
  3. The code to view the control is working properly but it is being executed again or hide the control, or
  4. The code to view the control is working properly but some other code is being executed to hide the control.

Set breakpoints in the code to view the control to see which of these is the problem. Once you have narrowed it down, it should be easier to fix.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top