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
You can use Tag
for this purpose in case when your should localize your application.
Moreover Tag
is an object so you can put any tapy of data there. For example Enum
type.
private void SubmenuItem_Click(object sender, EventArgs e)
{
var clickedMenuItem = sender as MenuItem;
EnumType item = (EnumType)clickedMenuItem.Tag;
switch(item) {
case TigeItem:
break;
case LionItem:
break;
...
}
}