I have a few custom (read-only) fields in a BO that works great when binding to controls. I am having problems trying to use these fields inside a BrowseDialog control. I can select the fields to be searched, but when I try to search on one of those fields, I get the following error:
KeyNotFoundException
The given key was not present in the dictionary.
Source : mscorlib
Stack Trace:
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow.BuildWhereElement(Int32 ParameterIndex)
at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow.BuildSearchWhereClause()
at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow.Search()
at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow.ExecuteSearch()
at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogSearchToolStrip.cmdSearch_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.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)
Do I need to add something to the BO to allow custom fields to be searched?
Thanks!