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?
Hello freecellwizard,
This method FindDataMenuItemByText is not recursive by design. It searches only the collection, for which it is called, for a DataMenuItem, which's Text property is equal to the provided string.
Let me know if I can provide any further assistance with this issue.
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thanks, that answers my question. I will write little function to recurse through a menu and find items at any level.