///<summary>
        /// Set the visibility for the node associated with a particular business object
        /// in the tree view.
        ///</summary>
        ///<param name="businessObject"></param>
        ///<param name="visible"></param>
        public void SetVisibility(IBusinessObject businessObject, bool visible)
        {
            NodeState nodeState = GetBusinessObjectNodeState(businessObject);

            if (visible)
            {
                int index = FindPositionIndexOf(businessObject);
                nodeState.Connect(index);
            }
            else
            {
                nodeState.Disconnect();
            }
        }