Check which submenu item was clicked in context menu strip

后端 未结 5 575
别那么骄傲
别那么骄傲 2021-01-06 05:53

There is a ContextMenuStrip in a grid control.

I have named it as GridContextMenu.

The GridContextMenu is populated with 4 - 5 items using the following code

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-06 06:27

    private void SubmenuItem_Click(object sender, EventArgs e)
    {        
        string clickedItemName=e.ClickedItem.Text;
    }
    

提交回复
热议问题