Problem Adding Manu Dynamically

2 posts, 0 answers
  1. Vuyiswa Maseko
    Vuyiswa Maseko avatar
    187 posts
    Member since:
    Jan 2010

    Posted 30 Aug 2010 Link to this post

    Good Day All

    I have a code that add the Menu's Dynamically, the First item on the menu should be "Choose" and i am adding items from a List<string> and the code that does that is look.

    ParentRecordsRow[0] = "EVENT"
    ParentRecordsRow[1] = "CLASS"


    and the count is 2

                  
    RadMenu1.Flow = ItemFlow.Vertical;
    //Add the Root
    RadMenuItem item = new RadMenuItem("Choose");
    //item.Text = "Add New Items";
    RadMenu1.Items.Add(item);
    //Bind Men
    for (int KK = 0; KK < ParentRecordsRow.Count ; KK++)
    {
            RadMenuItem itemSeparator = new RadMenuItem();
     
            RadMenuItem childItem = new RadMenuItem(ParentRecordsRow[KK]);
            //add the menu items
            item.Text = ParentRecordsRow[KK];
            //item.ImageUrl = "~/images/o!logo.png";
            item.Items.Add(childItem);
           
    }

    ok now the items gets Binded but i get "Events" Item as the First Item, like ITem Header and where it is i want the test "Choose" Now , i have attached the Screen-shot

    What i am i doing wrong

    Kind Regards

    Vuyiswa
  2. Vuyiswa Maseko
    Vuyiswa Maseko avatar
    187 posts
    Member since:
    Jan 2010

    Posted 30 Aug 2010 Link to this post

    Oops

    i Kept on adding the parent to a parent. Sorry :)

    Resolved
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top