Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
739
finding menu items by text in code if not at root level
posted

In my code it appears that the find by text method is not recursive.  That is, if I get a menu reference and want to go to a node that's 2 layers deep, this does not work:

DataMenuItem favItem= mnuMain.Items.FindDataMenuItemByText("My Favorites");

it returns null.

Instead I have to do this:

DataMenuItem favItem= mnuMain.Items.FindDataMenuItemByText("My Reports").Items.FindDataMenuItemByText("My Favorites");

 

Is this by design?