Hi,
When I navigate through Infragestic Ultratree then object reference error occur at UltraTreeNode.ActiveNode.
My code is similar like that
Public Class xaTreeView
Inherits Infragistics.Win.UltraWinTree.UltraTree
Public Sub SelectThisNode(ByVal pNode As UltraTreeNode)
Dim nodeToSelect As UltraTreeNode
nodeToSelect = pNode //"Selected Node by app"
If Not nodeToSelect Is Nothing Then
Me.SelectedNodes.Clear()
Me.SelectedNodes.Add(nodeToSelect)
Me.ActiveNode = nodeToSelect
Me.ActiveNode.Selected = True
End If
End Sub
End Class
Below is the stacktrace:
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements() at Infragistics.Win.UltraWinTree.UltraTreeUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements() at Infragistics.Win.UltraWinTree.UltraTreeNode.BringIntoViewHelper(Boolean includeChildNodes, Boolean includeHorizontal, Boolean includeVertical, Boolean leftOnly, Boolean isVerifying) at Infragistics.Win.UltraWinTree.UltraTreeNode.BringIntoViewHelper(Boolean includeChildNodes, Boolean includeHorizontal) at Infragistics.Win.UltraWinTree.UltraTree.SetActiveNode(UltraTreeNode node, Boolean bringIntoView, Boolean adjustHorizontalPosition, NodeActivationReason reason) at Infragistics.Win.UltraWinTree.UltraTree.set_ActiveNode(UltraTreeNode value)
at xaTreeView.SelectThisNode(UltraTreeNode pNode)
When i set exception setting true in code then below error shows at line Me.ActiveNode = nodeToSelect
error: Operator '=' is not defined for types 'UltraTreeNode' and 'UltraTreeNode'
Can you please suggest any?
Thanks,
Me
Hello,
I'm not certain why this error would occur. Please send a sample application that we can look further into it.
Some possibilities include a version mismatch or an error in the derived class, but I will not be able to tell without a sample.
I have created sample application but exception is not occur in sample application.
But exception is occurring when I going through our previous mentioned code in app.
Please suggest if any ?Is there any reason?
Two possibilities that occur to me are a version mismatch and an error specific to the application.
Are you using more than one version of Infragistics anywhere in your application? If so, that could lead to this issue and it's a good starting point.
In order to build an improved sample, I recommend slowly adding code from your application into the sample until the issue occurs in the sample. This method may, on its own, reveal the solution. Even if it doesn't, you can send the sample to us and we'll be able to investigate.