/// <summary>
 /// Expand all the appropriate tree nodes
 /// </summary>
 private void ExpandTreeView()
 {
     try
     {
         string   selectedNodePath = string.Empty;
         string[] selectedNodes    = selectedNodePathTextBox.Text.Split('!');
         if (selectedNodes.Length > 0)
         {
             for (int i = 0; i < selectedNodes.Length; i++)
             {
                 if (SiteDetailTreeView.FindNode(selectedNodePath + selectedNodes[i]) != null)
                 {
                     if (i < selectedNodes.Length - 1)
                     {
                         SiteDetailTreeView.FindNode(selectedNodePath + selectedNodes[i]).Expand();
                         selectedNodePath = selectedNodePath + selectedNodes[i] + "!";
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         editModeErrorPanel.Visible = true;
         editModeErrorMessage.Text  = ex.Message;
     }
 }
 /// <summary>
 /// Select the previously selected treeview node
 /// </summary>
 private void SelectNode()
 {
     try
     {
         if (selectedNodePathTextBox.Text.Trim().Length > 0)
         {
             TreeNode selectedNode = SiteDetailTreeView.FindNode(selectedNodePathTextBox.Text);
             if (selectedNode != null)
             {
                 selectedNode.Select();
                 scriptLiteral.Text = "<script>document.getElementById('" + selectedViewTextBox.Text + "').checked = true;</script>";
             }
         }
     }
     catch (Exception ex)
     {
         editModeErrorMessage.Text  = ex.Message;
         editModeErrorPanel.Visible = true;
     }
 }