﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Browse Dialog and Custom Fields</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 17:45:25 GMT</lastBuildDate><ttl>20</ttl><item><title>Browse Dialog and Custom Fields</title><link>http://forum.strataframe.net/FindPost3118.aspx</link><description>I have a few custom (read-only) fields in a BO that works great when binding to controls. &lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;KeyNotFoundException&lt;BR&gt;&amp;nbsp;The given key was not present in the dictionary.&lt;/P&gt;&lt;P&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : mscorlib&lt;/P&gt;&lt;P&gt;Stack Trace: &lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.ThrowHelper.ThrowKeyNotFoundException()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Collections.Generic.Dictionary`2.get_Item(TKey key)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow.BuildWhereElement(Int32 ParameterIndex)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow.BuildSearchWhereClause()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow.Search()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow.ExecuteSearch()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogSearchToolStrip.cmdSearch_Click(Object sender, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStrip.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;BR&gt;&lt;/P&gt;&lt;P&gt;Do I need to add something to the BO to allow custom fields to be searched?&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Wed, 27 Sep 2006 13:17:36 GMT</pubDate><dc:creator>Kevin Lingofelter</dc:creator></item><item><title>RE: Browse Dialog and Custom Fields</title><link>http://forum.strataframe.net/FindPost3126.aspx</link><description>As of right now you cannot overwrite the browse logic.&amp;nbsp; We have thought about adding an event to allow stored procedures and the overwrite of the query information.&amp;nbsp; But this is probably a ways out. :ermm:&amp;nbsp; Sorry.</description><pubDate>Wed, 27 Sep 2006 13:17:36 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Browse Dialog and Custom Fields</title><link>http://forum.strataframe.net/FindPost3125.aspx</link><description>Thud...Forehead has been smacked...=)&lt;/P&gt;&lt;P&gt;It is possible to override the search logic in the browseDialog? It would be nice to define a method in the BO which can be used to return search results.&lt;/P&gt;&lt;P&gt;Kevin</description><pubDate>Wed, 27 Sep 2006 12:54:02 GMT</pubDate><dc:creator>Kevin Lingofelter</dc:creator></item><item><title>RE: Browse Dialog and Custom Fields</title><link>http://forum.strataframe.net/FindPost3123.aspx</link><description>Ah, you cannot use a custom property as a search field because the search fields are directly translated back to the query that is executed on SQL Server.&amp;nbsp; So, if the column does not exist on SQL Server, the browse dialog cannot use the field as a search field because a) it doesn't know how to build a parameter for the field, and b) SQL Server would say the column didn't exist.</description><pubDate>Wed, 27 Sep 2006 12:34:57 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>