protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         AssignItemValuesForUpdate();
         PanelItemDetails.Visible = false;
         clsTopMostMessageBox.Show(clsMessages.GProcessSuccess);
         btnUpdate.Visible = false;
         TreeViewCategory.ExpandAll();
     }
     catch (Exception msgException)
     {
         clsTopMostMessageBox.Show(msgException.Message);
     }
 }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                string valueForSearch = txtSearch.Text == string.Empty ? null : txtSearch.Text;
                TreeViewCategory.ExpandAll();
                if (valueForSearch != null)
                {
                    foreach (TreeNode t in TreeViewCategory.Nodes)
                    {
                        if (t.Text.ToUpper() == valueForSearch.ToUpper())
                        {
                            t.Text = "<div style='color:orange;hight:15px'>" + t.Text + "</div>";

                            t.Selected = true;
                        }
                        for (int iParent = 0; iParent < t.ChildNodes.Count; iParent++)
                        {
                            if (t.ChildNodes[iParent].Text.ToUpper() == valueForSearch.ToUpper())
                            {
                                t.ChildNodes[iParent].Text = "<div style='color:orange;hight:15px'>" + t.ChildNodes[iParent].Text + "</div>";

                                t.ChildNodes[iParent].Selected = true;
                            }
                            for (int iChild = 0; iChild < t.ChildNodes[iParent].ChildNodes.Count; iChild++)
                            {
                                if (t.ChildNodes[iParent].ChildNodes[iChild].Text.ToUpper() == valueForSearch.ToUpper())
                                {
                                    t.ChildNodes[iParent].ChildNodes[iChild].Text = "<div style='color:orange;hight:15px'>" + t.ChildNodes[iParent].ChildNodes[iChild].Text + "</div>";

                                    t.ChildNodes[iParent].ChildNodes[iChild].Selected = true;
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception msgException)
            {
                clsTopMostMessageBox.Show(msgException.Message);
            }
        }
 protected void TreeViewCategory_TreeNodePopulate(object sender, TreeNodeEventArgs e)
 {
     PopulateSubLevel(Int32.Parse(e.Node.Value), e.Node);
     TreeViewCategory.ExpandAll();
 }