﻿<?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 » WinForms (How do I?)  » How Can I Set The Initial Search Value of a ComboBox in a Browse Dailog?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 14 Sep 2026 18:22:55 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How Can I Set The Initial Search Value of a ComboBox in a Browse Dailog?</title><link>http://forum.strataframe.net/FindPost30827.aspx</link><description>Hi Lastcanary,&lt;br/&gt;&lt;br/&gt;This process should be pretty simple and straight forward. &lt;span&gt;:hehe:&lt;/span&gt;&lt;br/&gt;You have to set the value based on the value type expected by the key field used in the combobox.&amp;nbsp; If that does not work, then provide the following info:&lt;br/&gt;&lt;ol&gt;&lt;li&gt;What is the type of the value you want to setup up, Sttring, Int, etc?&lt;/li&gt;&lt;li&gt;Paste the whole InitializeSearchFields code so we can see what are you doing.&lt;/li&gt;&lt;/ol&gt;</description><pubDate>Tue, 24 Jan 2012 08:48:30 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>How Can I Set The Initial Search Value of a ComboBox in a Browse Dailog?</title><link>http://forum.strataframe.net/FindPost29905.aspx</link><description>I have added a combobox to my search fields in a browse dialog. I am filling the combobox from a database that contains string data. I tried to modify the Initial Search Value of the combobox so that when the browse dialog is loaded it will only display the records with the given Initial Search Value. I am getting error about the "Input string was not in a correct format" when I try to run the application.&lt;br/&gt;&lt;br/&gt;Could you please help me to initialize the combobox Search Field on a browse dialog?</description><pubDate>Tue, 24 Jan 2012 08:48:30 GMT</pubDate><dc:creator>lastcanary</dc:creator></item><item><title>RE: How Can I Set The Initial Search Value of a ComboBox in a Browse Dailog?</title><link>http://forum.strataframe.net/FindPost30826.aspx</link><description>When I set a combo field to a string value I am getting:&lt;br/&gt;&lt;br/&gt;&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl01_lblFullMessage"&gt;"Input string was not in a correct format" &lt;br/&gt;&lt;br/&gt;Lets think that I have a table &lt;br/&gt;&lt;br/&gt;1-Person&lt;br/&gt;2-Company&lt;br/&gt;3-Cooperation&lt;br/&gt;&lt;br/&gt;When I set initial value to "Person" I am getting &lt;/span&gt;&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl01_lblFullMessage"&gt;"Input string was not in a correct format" error, how can I handle this?&lt;br/&gt;&lt;/span&gt;</description><pubDate>Tue, 24 Jan 2012 08:16:36 GMT</pubDate><dc:creator>lastcanary</dc:creator></item><item><title>RE: How Can I Set The Initial Search Value of a ComboBox in a Browse Dailog?</title><link>http://forum.strataframe.net/FindPost30820.aspx</link><description>Hi Lastcanary,&lt;br/&gt;&lt;br/&gt;[quote][b]lastcanary (1/20/2012)[/b][hr]Should I have to use enumerations to set the initial value of a combobox in Browse Dialog?&lt;br/&gt;&lt;br/&gt;Can I use the value in the Business Object to set the initial value of a combobox?[/quote]&lt;br/&gt;&lt;br/&gt;You can use any value you want.&amp;nbsp; In my sample I happen to use an enumeration for the "Transaction Type" field value and it is easier for me in code to work with the enumeration for these values.</description><pubDate>Fri, 20 Jan 2012 18:44:53 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How Can I Set The Initial Search Value of a ComboBox in a Browse Dailog?</title><link>http://forum.strataframe.net/FindPost30817.aspx</link><description>Should I have to use enumerations to set the initial value of a combobox in Browse Dialog?&lt;br/&gt;&lt;br/&gt;Can I use the value in the Business Object to set the initial value of a combobox?</description><pubDate>Fri, 20 Jan 2012 03:54:43 GMT</pubDate><dc:creator>lastcanary</dc:creator></item><item><title>RE: How Can I Set The Initial Search Value of a ComboBox in a Browse Dailog?</title><link>http://forum.strataframe.net/FindPost29906.aspx</link><description>Hi,&lt;br/&gt;&lt;br/&gt;You have to add the value in the InitializeSearchFields event.&amp;nbsp; Here is a sample code from one of my browse dialogs where I am setting the TransactionType field value.&lt;br/&gt;&lt;span&gt;[code]&lt;/span&gt;&lt;span style="color:blue;"&gt;Private&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;Sub&lt;/span&gt;&amp;nbsp;FirstUseImportBrowseDialog_InitializeSearchFields(&lt;span style="color:blue;"&gt;ByVal&lt;/span&gt;&amp;nbsp;sender&amp;nbsp;&lt;span style="color:blue;"&gt;As&lt;/span&gt;&amp;nbsp;System.&lt;span style="color:#2b91af;"&gt;Object&lt;/span&gt;,&amp;nbsp;&lt;span style="color:blue;"&gt;ByVal&lt;/span&gt;&amp;nbsp;e&amp;nbsp;&lt;span style="color:blue;"&gt;As&lt;/span&gt;&amp;nbsp;System.&lt;span style="color:#2b91af;"&gt;EventArgs&lt;/span&gt;)&amp;nbsp;&lt;span style="color:blue;"&gt;Handles&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;MyBase&lt;/span&gt;.InitializeSearchFields&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:blue;"&gt;Me&lt;/span&gt;.SearchFields(&lt;span style="color:#a31515;"&gt;"TransactionType"&lt;/span&gt;).InitialValue&amp;nbsp;=&amp;nbsp;Enumerations.&lt;span style="color:#2b91af;"&gt;TransactionType&lt;/span&gt;.FirstUseImport&lt;br/&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style="color:blue;"&gt;Sub&lt;/span&gt;&lt;span&gt;[/code]&lt;/span&gt;</description><pubDate>Fri, 22 Apr 2011 09:33:32 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>