title: How to add submenu items to menuitems
body: <p>I have created a Table layout in windows forms as shown in figure, i have added a right mouse button click Menu to my table, </p>
  
  <p>i wnt to add submenu items to following menuitems such as</p>
  
  <p>When i click <code>add device</code> it should show subitems such as <code>sounder</code>, <code>MCP</code>, <code>strobe</code> etc 
  When i click <code>fault</code>  it should show subitems such as <code>open circuit fault</code>, <code>sounder fault</code>, `short circuit fault' so on</p>
  
  <p>This is how i created menuitems</p>
  
  <pre><code>    ContextMenu m = new ContextMenu();
      MenuItem addDevice = new MenuItem("Add Device");
      MenuItem deleteDevice = new MenuItem("delete Device");
      MenuItem fire = new MenuItem("Fire");
      MenuItem fault = new MenuItem("Fault");
      MenuItem suppress = new MenuItem("Suppress");
      m.MenuItems.AddRange(new MenuItem[] { addDevice, deleteDevice, fire, fault,suppress});
      tableLayout.ContextMenu = m;
      m.Show((Control)(sender), e.Location);
  </code></pre>
  
  <p>The below is my form and table layout</p>
  
  <p><a href="https://i.stack.imgur.com/8UyqC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8UyqC.jpg" alt="http://i48.tinypic.com/33ok3cw.jpg"></a>
  </p>