H all,
I created a menu strip in Winform not dynamically. And it’s all in invisible, when the user is have rights only it visible. My one of username have full rights,. For this I wrote the below code,..
private void menuActive(MenuStrip menus)
{
foreach (ToolStripMenuItem menu in menus.Items)
{
menu.Visible = true;
for (int i = 0; i < menu.DropDown.Items.Count; i++)
{
menu.DropDown.Items[i].Visible = true;
}
}
}
But this is visible the menuItem and child menuItem,. my few childItem menu have more childItem. That means, In TsmMaster and tsmregisterMaster are visible but I can’t access the registerMasters Childs(ClassMaster, division Master….)
See the below image,..

Please give your suggestion.
Try it with recursion: