Load Multiple xml as ContextMenu in PreRender

1 posts, 0 answers
  1. Minesh
    Minesh avatar
    7 posts
    Member since:
    Apr 2007

    Posted 25 Apr 2009 Link to this post

    Here, We can take multiple xml file as contextmenu..

     foreach (RadTreeNode node in RadTreeView1.GetAllNodes())
            {         
                if (node.Level == 0)
                {
                    RadTreeViewContextMenu cn = new RadTreeViewContextMenu();
                    cn.LoadContentFile("ContextMenu.xml");
                    node.TreeView.ContextMenus.Add(cn);
                    node.ContextMenuID = cn.ID;
                }
                else if (node.Level == 1)
                {
                    RadTreeViewContextMenu cn = new RadTreeViewContextMenu();
                    cn.LoadContentFile("ContextMenu1.xml");
                    node.TreeView.ContextMenus.Add(cn);
                    node.ContextMenuID = cn.ID;
                }
                else
                {
                    RadTreeViewContextMenu cn = new RadTreeViewContextMenu();
                    cn.LoadContentFile("ContextMenu2.xml");
                    node.TreeView.ContextMenus.Add(cn);
                    node.ContextMenuID = cn.ID;
                }

            }
Back to Top