I recently release a new version of our software and a handful of users (out of 400-500) are reporting this error:
TopNode property cannot be set to an UltraTreeNode that is not visible in the user interface.
I have attached a word document with a screen capture of the stack trace.
Any ideas on what would cause this?
Currie
Hello ,
TopNobe property is used to position visible node at the top of the control. If the nod is not visible then you will get this exception. In order to avoid this you should first call BringIntoView() method to the node which you want to positioned. On this way you will insure that the node was scrolled to the visible area, and then set this node as TopNode.
Please let me know if you have any further questions.
I'm not the one setting TopNode. This looks to be internal code called on the Paint event. The odd thing is that it only happens for a handful of clients.
The only change i made to the Tree in this release was adding a BeginUpdate and EndUpdate when building the tree.
Hello Currie,
Can you provide me with the exact steps which I should perform on my side to reproduce the issue ? Do you have an isolated sample that I can use? Which exactly version of Infragistics you are using ? Based on the call stack it seems that this happens when Resize operation was performed.
I am waiting for your feedback.
Thank you for your reply. Unfortunately, i have been unable to reproduce this error. I have tried re-creating the client's environment as closely as I could, and I cannot get it to fail. The version of Infragistics is 13.1.20131.2116.
As i mentioned in my earlier post, the big change I made in this area was adding Begin End Update calls when we created/updated the tree. Is it possible that an uncaught error could have caused the EndUpdate not to be called, resulting in the error we are seeing?
Hi Currie,
My guess is that this was a bug in that old version of the tree. It was a long time ago, but I vaguely recall some issues like that with BeginUpdate/EndUpdate. If that is the case, then the only solution would be to update, either to a newer service release or a newer version. Or to remove the BeginUpdate/EndUpdate call.
The version you are using is not the latest. There is a build 13.1.20131.2124 available. So I would try that first.
How to get the latest service release - Windows Forms - Service Releases