I need to disable menus under submenu in c# windows.
how to do it. example
Master---mainmenu
Salesmaster----submenu
menu under submenu----salesreport,
sales 1
i can disable master, salesmaster
but i cannot disable sales1 or salesreport.
how to disable sales 1
foreach (ToolStripMenuItem mi in mastersToolStripMenuItem.DropDownItems)
{
if (mi.Name == fname)
{
mi.Visible = true;
mi.Enabled = true;
master = 1;
mastersToolStripMenuItem.Visible = true;
}
else if (master == 0)
{
mastersToolStripMenuItem.Visible = false;
}
}