I wish to add tools to a popup menu at runtime but it doesn't seem to work. I've written the code below (VB.NET), I don't receive any error but I can't see the newly added tool.
tool.CustomizedCaption = "Test"
Me.UltraToolbarsManager1.Toolbars("UltraToolbar1").Tools.AddTool("Test")
I've placed this code in the event "AfterSelectChange" of a Ultragrid cause the content of the popup menu should be different depend of the choosen grid cell.
Does anyone know how to do this?
This code will add the tool to a toolbar, not a popup menu. Instead try using this code (the key "PopupMenuTool1" will be different for you depending on which popup menu you want to add the tool to):
CType(Me.UltraToolbarsManager1.Tools("PopupMenuTool1"), PopupMenuTool).Tools.AddTool("Test")