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

Rad Menu/getting Parent menu items text

1 Answer 165 Views
Menu
This is a migrated thread and some comments may be shown as answers.
deva subramanian
Top achievements
Rank 1
deva subramanian asked on 28 Jun 2012, 10:01 AM
Hi Telerik,

First of all thanks for supporting and providing answers for my  previous questions. i am facing difficulties in getting the parent menu items text. I have attached the image below, in which when i click on the 'Test Member4' i should get the Parent menu item text (ie) 'Test Member3' programatically. i dont know whether telerik allows as to achieve that?  please give the solution for the same.

Note: all the menu items are dynamically created so i cant take any static text.

Thanks in Advance.
Dev.

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 22 Jan 2013, 06:39 AM
Hi,

Try the following code snippet to achieve your scenario.

C#:
void TestMember4_Click(object sender, EventArgs e)
   {
      RadMenuItem item=(RadMenuItem)sender;
      RadMenuItem parent=(RadMenuItem)item.HierarchyParent; //getting the parent
      string s= parent.Text;
   }

Hope this helps.

Regards,
Princy.
Tags
Menu
Asked by
deva subramanian
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or