How to right click to open Purchase Advisor screen from textbox Partnumber

how to right click to open Purchase Advisor screen from textbox Partnumber



after i corrected this error right click on the textbox:

Application Error

Exception caught in: System.Xml

Error Detail

Message: ‘/ContextMenuing/Purchase Advisor’ has an invalid token.
Program: System.Xml.dll
Method: ParseXPathExpresion

Client Stack Trace

at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion)
at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
at System.Xml.XPath.XPathNavigator.Select(String xpath)
at System.Xml.XmlNode.SelectNodes(String xpath)
at Ice.Lib.Framework.EpiContextToolsManager.GetContextMenuNodesFromContextMenuXmlFile(ContextMenuBinding contextBinding)
at Ice.Lib.Framework.EpiContextToolsManager.BuildMenusFromContextMenuXmlFile(ContextMenuBinding contextBinding, IList1& menuItems, ToolBase& bpmHoldTool, IList1& quickSearches)
at Ice.Lib.Framework.StandardControlPopupMenuBuilderBase.BuildContextMenu(PopupMenuTool contextMenu, Control registeredControl, Control sourceControl)
at Ice.Lib.Framework.PopupMenuBuilderBase.BuildContextMenu(Control sourceControl)
at Ice.Lib.Framework.PopupMenuBuilderBase.ContextMenu_Opening(Object sender, CancelEventArgs e)
at System.Windows.Forms.ToolStripDropDown.OnOpening(CancelEventArgs e)
at System.Windows.Forms.ToolStripDropDown.SetVisibleCore(Boolean visible)
at System.Windows.Forms.ContextMenuStrip.SetVisibleCore(Boolean visible)
at System.Windows.Forms.ToolStripDropDown.Show(Control control, Point position)
at System.Windows.Forms.ContextMenuStrip.ShowInternal(Control source, Point location, Boolean isKeyboardActivated)
at System.Windows.Forms.Control.WmContextMenu(Message& m, Control sourceControl)
at System.Windows.Forms.Control.WmContextMenu(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.TextBox.WndProc(Message& m)
at Infragistics.Win.EmbeddableTextBoxWithUIPermissions.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I wonder if “Purchase Advisor” exists in Context Menu Maintenance on your system, what it looks like?

For now, added a simple example below using ContextMenuKey Part.PartNumber on UD40.Key1:
image
image

private void UD40Form_Load(object sender, EventArgs args)
	{
	// Add Event Handler Code
	MessageBox.Show("Form Load - Key1 ContextMenu Test");
	Ice.Lib.Framework.EpiTextBox txtPartNum =(Ice.Lib.Framework.EpiTextBox)csm.GetNativeControlReference("46567b2e-6bc0-4967-be35-a0ec6843838f");
	txtPartNum.EpiContextMenuKey = "Part.PartNum";
	edvUD40.dataView.Table.Columns["Key1"].ExtendedProperties["ContextMenuID"] = "Part.PartNum";
	edvUD40.dataView.Table.Columns["Key1"].ExtendedProperties["Like"] = "Part.PartNum";
	}

(per the prior example - [SOLVED]Adding Context Menu Item to CustomContextOnly textbox)

2 Likes