﻿<?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?)  » BrowseDialog</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 03:11:07 GMT</lastBuildDate><ttl>20</ttl><item><title>BrowseDialog</title><link>http://forum.strataframe.net/FindPost19211.aspx</link><description>How make a search name and return code in the BO ?</description><pubDate>Wed, 10 Sep 2008 10:21:08 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19254.aspx</link><description>Yup....Ivan is right on the money ;)</description><pubDate>Wed, 10 Sep 2008 10:21:08 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19247.aspx</link><description>Hi Rafael.&lt;/P&gt;&lt;P&gt;I think it is going to be hard to tell you "why", without knowing how you are fetching your data. The thing is, at the point you are getting an error, your BO is empty. Have a look at your fill methods and that might give you some clues.</description><pubDate>Wed, 10 Sep 2008 07:38:31 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19238.aspx</link><description>Yes but in my SqlServer have 70 registers and return of count = 0 , Why ?</description><pubDate>Tue, 09 Sep 2008 17:37:52 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19237.aspx</link><description>That's right....you need to test on whether there is actually a record loaded in the BO because the CurrentRow relies on the CurrentRowIndex, which is a -1 if there are no records.&amp;nbsp; So add a test on the count around your code:&lt;/P&gt;&lt;P&gt;[codesnippet]if(this.Count &amp;gt; 0)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; // Place your logic here&lt;BR&gt;}&lt;BR&gt;else&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; // Take the empty BO into account&lt;BR&gt;}[/codesnippet]</description><pubDate>Tue, 09 Sep 2008 17:13:18 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19236.aspx</link><description>I have a code:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;[code]private&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; btnLkpCondPagamento_Click(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&lt;FONT color=#008080 size=2&gt;EventArgs&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.bdCondicaoDePagamento.ShowDialog() == &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&lt;FONT color=#008080 size=2&gt;DialogResult&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.OK)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;cdp_cod.Text = &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&lt;FONT color=#008080 size=2&gt;Convert&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.ToString(sysPedidoCompraCondicaoDePagamento1.cdp_cod);&lt;/P&gt;&lt;P&gt;cdp_descr.Text = &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&lt;FONT color=#008080 size=2&gt;Convert&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.ToString(sysPedidoCompraCondicaoDePagamento1.cdp_descr);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}[/code]&lt;/P&gt;&lt;P&gt;But have a error :&amp;nbsp; The CurrentRow could not be evaluated because the CurrentRowIndex is out of range.&amp;nbsp; Business object record count: 0.&amp;nbsp; CurrentRowIndex: -1.&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;[code]public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; System.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&lt;FONT color=#008080 size=2&gt;Int32&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; cdp_cod&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;get&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; loValue;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#ff1111&gt;loValue = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff1111&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;this&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.CurrentRow[&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;"cdp_cod"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#ff1111&gt;];&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; (loValue == &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&lt;FONT color=#008080 size=2&gt;DBNull&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.Value)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;else&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; (System.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;&lt;FONT color=#008080 size=2&gt;Int32&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;)loValue;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;set&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.CurrentRow[&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;&lt;FONT color=#800000 size=2&gt;"cdp_cod"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;] = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;value&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}[/code]&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Tue, 09 Sep 2008 16:41:58 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19232.aspx</link><description>I know that to convert but if have a solution in property of textbox i will use</description><pubDate>Tue, 09 Sep 2008 14:29:37 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19231.aspx</link><description>I think you have to convert it using CSTR()</description><pubDate>Tue, 09 Sep 2008 14:21:41 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19228.aspx</link><description>&lt;FONT size=2&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;Campo.Text = sysFornecedorBO1.for_cod;&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;Campo2.Text = sysFornecedorBO1.for_nome;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;Have a error: [code]Error&amp;nbsp;4&amp;nbsp;Cannot implicitly convert type 'int' to 'string'&amp;nbsp;D:\GoLive Corporate\myForms\frmPedidoCompra.cs&amp;nbsp;207&amp;nbsp;33&amp;nbsp;GoLiveCorporate[/code]&lt;BR&gt;&lt;/P&gt;&lt;P&gt;The textbox of the MricoFur.Strataframe have a property of numbers ?&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Tue, 09 Sep 2008 14:04:53 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19226.aspx</link><description>Olá Rafael.&lt;/P&gt;&lt;P&gt;Not sure about what you are asking, but I guess you want to use the BrowseDialog as a pick list, called from a buttom somewhere on you form, is that right? Once you get back from the BrowseDialog, the Business Object that was set as the BusinessObjectToPopulate on the BrowseDialog properties, will be populate, as the property name says, with the results of your search, and pointing to the selected row.&lt;/P&gt;&lt;P&gt;So, all you need to do is to use whatever piece of information you need from it.&lt;/P&gt;&lt;P&gt;Lets say you want to find a Customer, and fill the CustomerName on your Orders form. You drop a buttom on the form, and put some code in its Click event,&amp;nbsp;like the following, to call your BrowseDialog and set the Text property of your Customer textbox:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Me.MyBrowseDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.txtCustomerName.Text = CustomersBO1.cus_Name&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Does that help?</description><pubDate>Tue, 09 Sep 2008 13:32:25 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19225.aspx</link><description>thank all :)&lt;/P&gt;&lt;P&gt;i study this example, if i have a doubt, i post :)</description><pubDate>Tue, 09 Sep 2008 13:25:30 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19223.aspx</link><description>Sample projects may have been created with previous version of SF, all you have to do is the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Close all&amp;nbsp;open files.&lt;/LI&gt;&lt;LI&gt;Build the project or solution and that will take care of the problem.&lt;/LI&gt;&lt;/UL&gt;</description><pubDate>Tue, 09 Sep 2008 13:19:08 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19222.aspx</link><description>First build the solution.&amp;nbsp; CustomersBO1 doesn't exist until you first build the solution so that the object actually exists.</description><pubDate>Tue, 09 Sep 2008 13:18:36 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19221.aspx</link><description>I Speak Portuguese.&lt;/P&gt;&lt;P&gt;When I open Designer of the Sample Strataframe BrowseDialog, have a erros :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The variable 'CustomersBO1' is either undeclared or was never assigned. &lt;/STRONG&gt;&lt;BR&gt;why ?</description><pubDate>Tue, 09 Sep 2008 13:00:06 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19220.aspx</link><description>Rafael,&lt;/P&gt;&lt;P&gt;The help file have detail information on how to use the Browse Dialog in the topic I posted before, also there is another topic "Adding&amp;nbsp;a Browse Dialog to a&amp;nbsp;Form" which explain in detail this process,&amp;nbsp;it does not make sense to copy here what is already in detail in the help file.&amp;nbsp; Did you check this topic?&lt;/P&gt;&lt;P&gt;Also do you speak Spanish?</description><pubDate>Tue, 09 Sep 2008 12:51:04 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19219.aspx</link><description>I already configured browserdialog but as to use in textbox with the data of the selected customer</description><pubDate>Tue, 09 Sep 2008 12:33:35 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19218.aspx</link><description>I do not obtain to postar mine I doubt, the forum I return error</description><pubDate>Tue, 09 Sep 2008 12:33:04 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: BrowseDialog</title><link>http://forum.strataframe.net/FindPost19216.aspx</link><description>Hi Rafael,&lt;/P&gt;&lt;P&gt;This could be a very lenghty topic, so I would suggest you read the following topic "Using the Browse Dialog" in the help file and also to look at the SF sample projects, including StrataFlix, then if you have a more specific question, come back here with it.</description><pubDate>Tue, 09 Sep 2008 11:44:37 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>