﻿<?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?)  » Populate Comboboxwith dependency of code product</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:47:01 GMT</lastBuildDate><ttl>20</ttl><item><title>Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19335.aspx</link><description>How population combobox with dependency of code product.&lt;/P&gt;&lt;P&gt;[code]Select * from Produto where code_product = textbox_code_product[/code]</description><pubDate>Sun, 14 Sep 2008 23:34:37 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19408.aspx</link><description>I have a Example !&lt;/P&gt;&lt;P&gt;Eu preciso population a comboBox1 com o valor da&amp;nbsp; textbox1. O Meu problema é que eu preciso fazer um Select * from ProjetoEquipamento where prj_nrow = value of textbox1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Como population combobox whith Select ?</description><pubDate>Sun, 14 Sep 2008 23:34:37 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19389.aspx</link><description>Rafael,&lt;/P&gt;&lt;P&gt;I think that you are inadvertantly making a very simple task very complex.&amp;nbsp; As mentioned in previous posts, there are a lot of samples that show how to do this...and I know that other developers have tried to help you understand as well.&amp;nbsp; Maybe at this point you should just create a simple sample illustrating your problem and post it out here instead of all of these posts as this doesn't really seem to be going anywhere.&amp;nbsp; Maybe a real sample from YOUR perspective and then a correction via the forum posters will help you better undertstand where you are going wrong.</description><pubDate>Sat, 13 Sep 2008 22:16:17 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19381.aspx</link><description>yes, but my probleman is no this. &lt;/P&gt;&lt;P&gt;I modified my code for&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;[quote]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void btnProjeto_Click(object sender, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; if (this.bdProjeto.ShowDialog() == DialogResult.OK)&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; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prj_cod.Text = Convert.ToString(sysProjetoBO1.prj_cod);&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proj_eqp_nrow.Requery();&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; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void proj_eqp_nrow_ListPopulating(MicroFour.StrataFrame.UI.ListPopulatingEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; e.Parameters[0].Value = sysProjetoEquipamentoBO1.proj_eqp_nrow;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;[/quote]In BO&lt;BR&gt;[quote]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void FillByProjetoEquipamentoGL(int nRowProjeto)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; GoLiveGlobals.infoMessageBox(nRowProjeto.ToString());&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; //this.FillDataTable("select * from tabproj_equipamento where prj_nrow = " + nRowProjeto);&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; SqlCommand cmd = new SqlCommand();&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; cmd.CommandText = String.Format("select * from tabproj_equipamento where prj_nrow = " + nRowProjeto, this.TableName);&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; this.FillDataTable(cmd);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }[/quote]&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;In GoLiveGlobals.infoMessageBox(nRowProjeto.ToString()); return 0 ! Why ?&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Sat, 13 Sep 2008 00:40:24 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19380.aspx</link><description>Hi Rafael,&lt;P&gt;I noticed you have this code:&lt;/P&gt;&lt;P&gt;[codesnippet]private void proj_eqp_nrow_ListPopulating(MicroFour.StrataFrame.UI.ListPopulatingEventArgs e)&lt;BR&gt;{&lt;BR&gt;e.Parameters[0].Value = prj_cod.Text;&lt;BR&gt;}&lt;BR&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;But, your FillByProjetoEquipamentoGL(&lt;FONT color=#dd3333&gt;&lt;STRONG&gt;Int32&lt;/STRONG&gt;&lt;/FONT&gt;) is expecting an Integer and the prj_cod.Text is string, so you have to make sure the value of the prj_cod.Text is an Integer, so you need to convert it using cint() or the equivalent C## function.</description><pubDate>Sat, 13 Sep 2008 00:09:35 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19379.aspx</link><description>These images are of the same component combobox&lt;BR&gt;I need value sysProjetoBO1.prj_nrow in Value Member for&amp;nbsp;sysProjetoEquipamentoBO of the propierty PopulationDataSourceSettings. How&amp;nbsp;make this ?&lt;/P&gt;&lt;P&gt;In Portuguese&lt;/P&gt;&lt;P&gt;Eu preciso do valor sysProjetoBO1.prj_nrow na Value member do&amp;nbsp;&amp;nbsp;sysProjetoEquipamentoBO&amp;nbsp; da propriedade PopulationDataSourceSettings. Como eu faço isso ?</description><pubDate>Fri, 12 Sep 2008 23:43:11 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19369.aspx</link><description>I forgot myself to place the image of the configuration of combobox</description><pubDate>Fri, 12 Sep 2008 15:01:39 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19368.aspx</link><description>I tried to make equal in it I finish topic passed for the Ivan but he did not give certain&lt;/P&gt;&lt;P&gt;In BO&lt;/P&gt;&lt;P&gt;[quote]public void FillByProjetoEquipamentoGL(string nRowProjeto)&lt;BR&gt;{&lt;BR&gt;this.FillDataTable("SELECT * FROM "+ this.TableName);&lt;BR&gt;}[/quote]&lt;/P&gt;&lt;P&gt;in Form&lt;/P&gt;&lt;P&gt;[quote]private void proj_eqp_nrow_ListPopulating(MicroFour.StrataFrame.UI.ListPopulatingEventArgs e)&lt;BR&gt;{&lt;BR&gt;e.Parameters[0].Value = prj_cod.Text;&lt;BR&gt;}&lt;BR&gt;private void proj_eqp_nrow_Leave(object sender, EventArgs e)&lt;BR&gt;{&lt;BR&gt;this.proj_eqp_nrow.Requery();&lt;BR&gt;}[/quote]&lt;/P&gt;&lt;P&gt;What it is made a mistake?</description><pubDate>Fri, 12 Sep 2008 14:56:23 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19362.aspx</link><description>Rafael, these are only some links about ListPopulating event:&lt;/P&gt;&lt;P&gt;&lt;A href="http://forum.strataframe.net/FindPost14556.aspx"&gt;http://forum.strataframe.net/FindPost14556.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forum.strataframe.net/FindPost12211.aspx"&gt;http://forum.strataframe.net/FindPost12211.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forum.strataframe.net/FindPost14538.aspx"&gt;http://forum.strataframe.net/FindPost14538.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forum.strataframe.net/FindPost16492.aspx"&gt;http://forum.strataframe.net/FindPost16492.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;:cool:</description><pubDate>Fri, 12 Sep 2008 13:37:02 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19355.aspx</link><description>I searched in the forum but I did not obtain to develop. It could send me example code?</description><pubDate>Fri, 12 Sep 2008 11:32:17 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19348.aspx</link><description>Well I am not totally certain what you are trying to do.&amp;nbsp; But let's back up and start here.&amp;nbsp; First, all SF lists allow you to populate via a BO.&amp;nbsp; You will not want to just slap in SELECT code.&amp;nbsp; You will want to create a Fill command that accepts whatever parms that you need for population.&lt;/P&gt;&lt;P&gt;Second, you will want to set the combo being populated to populate Manual instead of FormLoad because you are going to want to first ensure that your dependent code is set.&lt;/P&gt;&lt;P&gt;Third, once you have created a Fill method and setup the PopulationDataSourceSettings to use that fill method on the Combo, then you will want to handle the ListPopulating event to provide the value from the dependent code.&lt;/P&gt;&lt;P&gt;Finally, there are a &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;TON&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; of samples on this.&amp;nbsp; This is an extremely common task done within the framework.&amp;nbsp; There are samples that come with the framework showing how to do this, you can look at the StrataFlix sample, or just search on the ListPopulating event within the forum and you will find a LOT of samples.</description><pubDate>Fri, 12 Sep 2008 08:12:49 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19337.aspx</link><description>I tried to use the code below &lt;BR&gt;[code]private void prj_cod_Leave(object sender, EventArgs e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;sysProjetoEquipamentoBO1.FillDataTable("SELECT * FROM tabproj_equipamento WHERE prj_nrow = " + sysProjetoBO1.prj_nrow);&lt;/P&gt;&lt;P&gt;}[/code]&lt;/P&gt;&lt;P&gt;but he did not give certain. I have a field sysProjetoBO1.prj_cod and sysProjetoBO1.prj_nrow in the same table. I need to show prj_cod and populate combobox for the code sysProjetoBO1.prj_nrow. Combobox populated is sysProjetoEquipamentoBO1.prj_nrow!</description><pubDate>Thu, 11 Sep 2008 23:48:56 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: Populate Comboboxwith dependency of code product</title><link>http://forum.strataframe.net/FindPost19336.aspx</link><description>I'm not sure I understand the question... but I'll give it a shot ;).&lt;br&gt;
&lt;br&gt;
Are you trying to pull back all the records that match the selected value of your combo box?&lt;br&gt;
&lt;br&gt;
[codesnippet]MyBO.FillDataTable("SELECT * FROM Table WHERE code_product = " &amp; cbo_Product.SelectedValue)[/codesnippet]&lt;br&gt;
(I wouldn't recommend hard coding it in the FillDataTable like that, but it gives you a start)&lt;br&gt;
&lt;br&gt;
Or are you trying to populate the combo box itself with all the records associated with a given code? If so, then just add a fill method to your BO that corresponds to your select statement, and call that method in your combo's PopulationDataSourceSettings.</description><pubDate>Thu, 11 Sep 2008 23:04:29 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item></channel></rss>