This is a migrated thread and some comments may be shown as answers.

Problem Adding Manu Dynamically

1 Answer 35 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Vuyiswa
Top achievements
Rank 2
Vuyiswa asked on 30 Aug 2010, 08:31 AM
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

1 Answer, 1 is accepted

Sort by
0
Vuyiswa
Top achievements
Rank 2
answered on 30 Aug 2010, 10:22 AM
Oops

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

Resolved
Tags
Menu
Asked by
Vuyiswa
Top achievements
Rank 2
Answers by
Vuyiswa
Top achievements
Rank 2
Share this question
or