This work!
If (TryCast(e.Node.DataItem, DataRowView))("NodeId").ToString() = 3 Then e.Node.AllowDrag = FalseEnd If
This is not work
If (TryCast(e.Node.DataItem, DataRowView))("ParentNodeId").ToString() = 3 Then e.Node.AllowDrag = FalseEnd IfGet: Exception Details: System.FormatException: Input string was not in a correct format.