Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
Object ref error occur at UltraTreeNode.ActiveNode
posted

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