﻿<?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?)  » ChildAutoFilter, what I'm missing?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 22 May 2026 11:36:08 GMT</lastBuildDate><ttl>20</ttl><item><title>ChildAutoFilter, what I'm missing?</title><link>http://forum.strataframe.net/FindPost28561.aspx</link><description>&lt;span title="" se="Segui os passos do manual do strata, mas nao consigo fazer BO filtrar automaticamente os dados atraves da propriedade ChildAutoFilter." te="Follow the steps in the manual strata, but I can not do BO automatically filter the data through the property ChildAutoFilter. " closure_uid_4vkoja="797"&gt;Follow the steps in the manual strata, but I can not do BO automatically filter the data through the property ChildAutoFilter. &lt;/span&gt;&lt;span title="" se="Utilizei a base StrataFrameSample para o teste, com as tabelas Orders e OrdersItens;" te="I used the base StrataFrameSample for testing, with the tables Orders and OrdersItens;&amp;#13;&amp;#10;" closure_uid_4vkoja="798"&gt;I used the base StrataFrameSample for testing, with the tables Orders and OrdersItens;&lt;br/&gt;&lt;/span&gt;&lt;span title="" se="Fiz o relacionamento entre os BO no boOrdersItens, marquei a opcao ChildAutoFilter no boOrders, quando trouxe os dois BOs para meu formulario, marquie o ParentBusiness do boOrdersItens com o boOrders." te="Did the relationship between the BO boOrdersItens, check the ChildAutoFilter boOrders when he brought the two MOBs for my application, the MARQUIER ParentBusiness of boOrdersItens with boOrders.&amp;#13;&amp;#10;" closure_uid_4vkoja="799"&gt;Did the relationship between the BO boOrdersItens, check the ChildAutoFilter boOrders when he brought the two MOBs for my application, the MARQUIER ParentBusiness of boOrdersItens with boOrders.&lt;br/&gt;&lt;/span&gt;&lt;span title="" se="Quando navego no boOrders, ele nao deveria filtrar automaticamente o boOrdersItens?" te="When I surf the boOrders, it should not automatically filter the boOrdersItens?&amp;#13;&amp;#10;" closure_uid_4vkoja="800"&gt;When I surf the boOrders, it should not automatically filter the boOrdersItens?&lt;br/&gt;&lt;/span&gt;&lt;span title="" se="Estou colocando em anexo minha aplicação." te="I'm putting my application attached." closure_uid_4vkoja="801"&gt;I'm putting my application attached.&lt;/span&gt;</description><pubDate>Mon, 04 Oct 2010 17:00:36 GMT</pubDate><dc:creator>Malcon</dc:creator></item><item><title>RE: ChildAutoFilter, what I'm missing?</title><link>http://forum.strataframe.net/FindPost28573.aspx</link><description>[quote][b]Malcon (10/4/2010)[/b][hr]Ivan, voce poderia me dar uma ajuda com essa duvida? O strata nao deveria ir buscar automaticamente os dados no banco, sem eu ter de executar um methodo de pesquisa como filldatatable() ou FillAll()?[/quote]&lt;br/&gt;&lt;br/&gt;Hey Malcon!&lt;br/&gt;&lt;br/&gt;Nope, SF is not supposed to go to the Database and automatically fetch the children records. As Edhy and Greg told you, the best approach to accomplish this, in you particular case, would be to use the Parent Navigated event and once this happened, go get the children. This is not&amp;nbsp;a filter, it is a complete Fill for the child BO. So, every time your parent navigates, you get its children inside the child BO and you will be fine.&lt;br/&gt;&lt;br/&gt;To get it filtered as you mentioned earlier, you would have to first fill your child BO with ALL records from the database, and then it would be filtered as the parent navigated. It can be done, but if this would be the best solution depends on your decisions.</description><pubDate>Mon, 04 Oct 2010 17:00:36 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: ChildAutoFilter, what I'm missing?</title><link>http://forum.strataframe.net/FindPost28571.aspx</link><description>[quote][b]Malcon (10/4/2010)[/b][hr]&lt;span title="" te="Edhy, now you left me with more doubts ..." se="Edhy, agora voce me deixou com mais duvidas..." closure_uid_u6u08u="1088"&gt;Edhy, now you left me with more doubts ...&lt;/span&gt;&lt;span title="" te="I understand that if I use a FillAll () on all my tables had been slow, but I would like to automate the process of navigation. " se="Entendo que se eu utilizar um FillAll() em todas as minhas tabelas ficara lento, mas eu gostaria de automatizar o processo de navegacao." closure_uid_u6u08u="1089"&gt;&lt;/span&gt;[/quote]&lt;br/&gt;&lt;br/&gt;Sorry about the doubts, but believe it me, it is very simple and easy.&lt;br/&gt;&lt;br/&gt;Again, you are responsible for loading the data.&amp;nbsp; SF has some predefined methods like FillByParent or FillByParentPK which will help you filter out the data, but how and when to use those is up to the developer to code.&lt;br/&gt;&lt;br/&gt;In your sample you where not getting the data for the child bo, then nothing was shown (that makes perfect sense).&amp;nbsp; I show you that using the ParentBO.Navigated, you can get the child data, or if you prefer to load them all at a single place, you can use the ChildBO.FillByParent(ParentBO), but again be aware that if you are loading a lot of records, that could slow down the form.&lt;br/&gt;&lt;br/&gt;In the case of StrataFlix, this is a very unique logic because it is designed to show only one single record in the ParentBO, then it will load all child records for that parent record, but you will not be able to navigate the parent, since it is designed to only show a single parent record at a time.&amp;nbsp; It is just another approach, and you can mix and match all approaches based on your application's requirements.</description><pubDate>Mon, 04 Oct 2010 15:16:40 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: ChildAutoFilter, what I'm missing?</title><link>http://forum.strataframe.net/FindPost28570.aspx</link><description>&lt;span title="" te="Edhy, now you left me with more doubts ...&amp;#13;&amp;#10;" se="Edhy, agora voce me deixou com mais duvidas..." closure_uid_u6u08u="1088"&gt;Edhy, now you left me with more doubts ...&lt;br/&gt;&lt;/span&gt;&lt;span title="" te="I understand that if I use a FillAll () on all my tables had been slow, but I would like to automate the process of navigation. " se="Entendo que se eu utilizar um FillAll() em todas as minhas tabelas ficara lento, mas eu gostaria de automatizar o processo de navegacao." closure_uid_u6u08u="1089"&gt;I understand that if I use a FillAll () on all my tables had been slow, but I would like to automate the process of navigation. &lt;/span&gt;&lt;span title="" te="Would not want to do more of the filter Bo Bo navigate the Child Parent. " se="Nao gostaria de fazer mais o filtro do Bo Child no navigate do Bo Parent." closure_uid_u6u08u="1090"&gt;Would not want to do more of the filter Bo Bo navigate the Child Parent. &lt;/span&gt;&lt;span title="" te="In strataflix example, when there is the search for parent BO, Bo automatically all children will be filtered.&amp;#13;&amp;#10;" se="No exemplo strataflix, quando ha a busca do BO parent, automaticamente todos os Bo children serão filtrados." closure_uid_u6u08u="1091"&gt;In strataflix example, when there is the search for parent BO, Bo automatically all children will be filtered.&lt;br/&gt;&lt;/span&gt;&lt;span title="" te="In the simple example I did, I would like the strata only search the data of BoOrderItesn, if I need to perform any kind of filter. " se="No exemplo simples que eu fiz, gostaria que o strata apenas busca-se os dados do BoOrderItesn, seu eu precisar realizar nenhum tipo de filtro." closure_uid_u6u08u="1092"&gt;In the simple example I did, I would like the strata only search the data of BoOrderItesn, if I need to perform any kind of filter. &lt;/span&gt;&lt;span title="" te="We saw examples of strata that is possible, but I could not reproduce the same.&amp;#13;&amp;#10;" se="Nos exemplos do strata vi que é possivel, mas nao consegui reproduzir igual." closure_uid_u6u08u="1093"&gt;We saw examples of strata that is possible, but I could not reproduce the same.&lt;br/&gt;&lt;/span&gt;&lt;span title="" te="To summarize the whole topic: How to perform strataframe fill (or rowMach CSS) MOBs in children?" se="Resumindo todo o topico: Como fazer para o strataframe realizar o fill (rowMach ou cascate) nos BOs children?" closure_uid_u6u08u="1094"&gt;To summarize the whole topic: &lt;font color=#ff0000&gt;How to perform strataframe fill (or rowMach ou cascate) BOs in children&lt;/font&gt;?&lt;/span&gt;</description><pubDate>Mon, 04 Oct 2010 14:39:04 GMT</pubDate><dc:creator>Malcon</dc:creator></item><item><title>RE: ChildAutoFilter, what I'm missing?</title><link>http://forum.strataframe.net/FindPost28569.aspx</link><description>[quote][b]Malcon (10/4/2010)[/b][hr]&lt;span title="" te="Thanks Odjy and Greg." se="Obrigado Odjy e Greg." closure_uid_iupbom="555"&gt;Thanks Odhy and Greg.&lt;br/&gt;&lt;/span&gt;&lt;span title="" te="My application is exactly as you told me. " se="Minha aplicacao esta exatamente assim como voces me disseram." closure_uid_iupbom="556"&gt;&lt;/span&gt;&lt;span title="" te="Which does not agree is that I have to fill all the BO son to navigate it properly. " se="O que nao concordo é que tenho de preencher todo o BO filho para que ele navegue corretamente." closure_uid_iupbom="559"&gt;&lt;/span&gt;&lt;span style="background-color: rgb(230, 236, 249); color: rgb(0, 0, 0);" title="" te="He should get the bank records only need the parent BO." se="Ele deveria ir buscar no banco apenas os registros necessario do BO parent." closure_uid_iupbom="560"&gt;He should get the bank records only need the parent BO&lt;/span&gt;[/quote]&lt;br/&gt;&lt;br/&gt;Malcon,&lt;br/&gt;&lt;br/&gt;You have total control on how you want your application to behave.&amp;nbsp; If you want the above, then fill the child BO using the FillByParent method instead, but like everything else, use common sense to place your FillBy commands so in this sample, the FillByParent should be after the boOrders.FillAll().&lt;br/&gt;&lt;br/&gt;Keep in mind that this is just a sample to get ideas, in a real application it could take a lot of time to fill all records by parent, and mostly for the child.&amp;nbsp; The StrataFlix sample uses another method which is more efficient by getting all the data needed in single trip to the database.&lt;br/&gt;&lt;br/&gt;Hope this help you understand the issue.</description><pubDate>Mon, 04 Oct 2010 14:12:06 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: ChildAutoFilter, what I'm missing?</title><link>http://forum.strataframe.net/FindPost28568.aspx</link><description>Ivan, voce poderia me dar uma ajuda com essa duvida? O strata nao deveria ir buscar automaticamente os dados no banco, sem eu ter de executar um methodo de pesquisa como filldatatable() ou FillAll()?</description><pubDate>Mon, 04 Oct 2010 14:06:35 GMT</pubDate><dc:creator>Malcon</dc:creator></item><item><title>RE: ChildAutoFilter, what I'm missing?</title><link>http://forum.strataframe.net/FindPost28567.aspx</link><description>&lt;span title="" te="Thanks Odjy and Greg.&amp;#13;&amp;#10;" se="Obrigado Odjy e Greg." closure_uid_iupbom="555"&gt;Thanks Odhy and Greg.&lt;br/&gt;&lt;/span&gt;&lt;span title="" te="My application is exactly as you told me. " se="Minha aplicacao esta exatamente assim como voces me disseram." closure_uid_iupbom="556"&gt;My application is exactly as you told me. &lt;/span&gt;&lt;span title="" te="I use to navigate the parent BO navigate the child. " se="Eu uso o navigate do parent BO para navegar no filho." closure_uid_iupbom="557"&gt;I use to navigate the parent BO navigate the child. &lt;/span&gt;&lt;span title="" te="But how has this possibility strataframe navigation automatically thought it would be more correct.&amp;#13;&amp;#10;" se="Mas como o strataframe tem essa possibilidade de navegação automatica achei que seria o mais correto." closure_uid_iupbom="558"&gt;But how has this possibility strataframe navigation automatically thought it would be more correct.&lt;br/&gt;&lt;/span&gt;&lt;span title="" te="Which does not agree is that I have to fill all the BO son to navigate it properly. " se="O que nao concordo é que tenho de preencher todo o BO filho para que ele navegue corretamente." closure_uid_iupbom="559"&gt;Which does not agree is that I have to fill all the BO son to navigate it properly. &lt;/span&gt;&lt;span style="background-color: #e6ecf9; COLOR: #000" title="" te="He should get the bank records only need the parent BO." se="Ele deveria ir buscar no banco apenas os registros necessario do BO parent." closure_uid_iupbom="560"&gt;He should get the bank records only need the parent BO&lt;/span&gt;</description><pubDate>Mon, 04 Oct 2010 14:03:19 GMT</pubDate><dc:creator>Malcon</dc:creator></item><item><title>RE: ChildAutoFilter, what I'm missing?</title><link>http://forum.strataframe.net/FindPost28565.aspx</link><description>Edhy's suggestion is excellent. One of the issues using the ChildFilterOption is that you must fill both the parent BO and the child BO will all available records for it to work. This is OK for small data sets, but not so good if you have lots of data. I almost always use the method Edhy is suggesting: get the child data when the parent is record is being viewed.&amp;nbsp; &lt;br/&gt;&lt;br/&gt;Also, you probably want to also clear the child BO if for some reason the parent BO is empty. To expand on Edhy's code:&lt;br/&gt;&lt;br/&gt;[codesnippet]&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl01_lblFullMessage"&gt;&lt;span&gt;&lt;pre style="font-family: consolas;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;void&lt;/span&gt;&amp;nbsp;boOrders_Navigated(MicroFour.StrataFrame.Business.&lt;span style="color: rgb(43, 145, 175);"&gt;NavigatedEventArgs&lt;/span&gt;&amp;nbsp;e)&lt;br/&gt;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt;&amp;nbsp;(boOrders.Count&amp;nbsp;&amp;gt;&amp;nbsp;0)&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; boOrdersItens.FillByParentPrimaryKey(boOrders.or_pk);&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; else&lt;br/&gt;&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; //-- Clear if parent BO is empty.&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; boOrdersItens.Clear();&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; }[/codesnippet]&lt;br/&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;</description><pubDate>Mon, 04 Oct 2010 11:01:47 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: ChildAutoFilter, what I'm missing?</title><link>http://forum.strataframe.net/FindPost28564.aspx</link><description>Hi Malcon,&lt;br/&gt;&lt;br/&gt;First, I am not a C# developer, so if my code is not correct, please use it as starting point &lt;span&gt;:D&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;The &lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl01_lblFullMessage"&gt;&lt;span title=""&gt;ChildAutoFilter is not very reliable, do a search in the forums and read about it.&amp;nbsp; Now, in your sample you are not getting the data for the child BO (boOrdersItens), at any rate you are always responsible to get the data into your BO so you can use the BO's functionality.&lt;br/&gt;&lt;br/&gt;To make it easy and workable I did the following:&amp;nbsp; &lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;Reset the ChildAutoFilterOption to Off&lt;/li&gt;&lt;li&gt;Created a boOrders_Navigated event and put the code to fill the child BO as follow:&lt;/li&gt;&lt;/ol&gt;&lt;span&gt;[quote]&lt;br/&gt;&lt;/span&gt;&lt;pre style="font-family: consolas;"&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;void&lt;/span&gt;&amp;nbsp;boOrders_Navigated(MicroFour.StrataFrame.Business.&lt;span style="color: rgb(43, 145, 175);"&gt;NavigatedEventArgs&lt;/span&gt;&amp;nbsp;e)&lt;br/&gt;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt;&amp;nbsp;(boOrders.Count&amp;nbsp;&amp;gt;&amp;nbsp;0)&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; boOrdersItens.FillByParentPrimaryKey(boOrders.or_pk);&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br/&gt;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;span&gt;[/quote]&lt;/span&gt;&lt;br/&gt;Your sample should now work and will give you the hints you need to know why it was not working.&amp;nbsp; Remember, you are responsible to get the data into the BOs.</description><pubDate>Mon, 04 Oct 2010 10:28:28 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>