protected void expandSelectedNode()
 {
     if (!string.IsNullOrEmpty(selectedNodeId))
     {
         TreeNode pomTN = new mpTreeView().findNodeByValue(exampleGroupsTV.Nodes, selectedNodeId);
         pomTN.Select();
         while (pomTN.Parent != null)
         {
             pomTN.Expand();
             pomTN = pomTN.Parent;
         }
     }
 }
        protected void fillControls()
        {
            using (dboManager dboManager = new dboManager())
            {
                dboManager.command.CommandText = "SELECT * FROM [examples] WHERE [id] = @exampleId";
                dboManager.command.Parameters.AddWithValue("@exampleId", exampleId);
                SqlDataReader reader = dboManager.command.ExecuteReader();
                if (!reader.Read())
                {
                    Response.End();
                }
                exampleNameTB.Text = reader["name"].ToString();
                enterCKE.Text      = reader["enter"].ToString();
                solutionCKE.Text   = reader["solution"].ToString();
                resultCKE.Text     = reader["result"].ToString();
                labelNamesTB.Text  = reader["labels"].ToString();

                foreach (ListItem li in schoolGradeCHBL.Items)
                {
                    if (reader["schoolGrade"].ToString().Contains("-" + li.Value + "-"))
                    {
                        li.Selected = true;
                    }
                }
                schoolGradeCHBL_SelectedIndexChanged(null, null);
                foreach (ListItem li in difficultyRBL.Items)
                {
                    if (li.Value == reader["difficulty"].ToString())
                    {
                        li.Selected = true; break;
                    }
                }

                foreach (string id in reader["groupIds"].ToString().Split('-'))
                {
                    if (id == "")
                    {
                        continue;
                    }
                    TreeNode tn = new mpTreeView().findNodeByValue(exampleGroupsTV.Nodes, id);
                    tn.Checked = true;
                    while (tn.Parent != null)
                    {
                        tn.Expand(); tn = tn.Parent;
                    }
                }
            }
        }