﻿<?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 / WinForms (How do I?)  / Filtering second RepositoryItemLookUpEdit based on value in the first one. / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Tue, 02 Dec 2008 16:57:37 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Filtering second RepositoryItemLookUpEdit based on value in the first one.</title><link>http://forum.strataframe.net/Topic16697-7-1.aspx</link><description>G'day&lt;P&gt;We use Strataframe and devexpress, and have had to filter one lookup on another lookup a number of times. What we do is use a bo as the basis for each lookup and have a stored procedure to populate each, then we use the CellValueChanged event to repopulate the lookup appropriately. The following shows a Country/States example in a cardview where a Company is being defined that has both a Delivery and Postal address which could potentially be in different countries, a gridview should be similar.&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; CardView_CellValueChanged(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; sender &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Object&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs) _&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;FONT size=2&gt; CardView1.CellValueChanged&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;  Select&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Case&lt;/FONT&gt;&lt;FONT size=2&gt; e.Column.FieldName&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;    Case&lt;/FONT&gt;&lt;FONT size=2&gt; boCMPFieldNames.CMP_CountryForDeliv.ToString&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;      Me&lt;/FONT&gt;&lt;FONT size=2&gt;.BoCMP1.FilterChildRecords()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;      Me&lt;/FONT&gt;&lt;FONT size=2&gt;.BoLookupTableStates.RefreshBO(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@CNTID"&lt;/FONT&gt;&lt;FONT size=2&gt;, BoCMP1.&lt;/FONT&gt;&lt;FONT size=2&gt;CMP_CountryForDeliv.ToString&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;    Case&lt;/FONT&gt;&lt;FONT size=2&gt; boCMPFieldNames.CMP_CountryForPost.ToString&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;      Me&lt;/FONT&gt;&lt;FONT size=2&gt;.BoCMP1.FilterChildRecords()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;      Me&lt;/FONT&gt;&lt;FONT size=2&gt;.BoLookupTableStates.RefreshBO(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"@CNTID"&lt;/FONT&gt;&lt;FONT size=2&gt;, BoCMP1.&lt;/FONT&gt;&lt;FONT size=2&gt;CMP_CountryForPost.ToString&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;    Case&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Else&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;       ' no action&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;  End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Select&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;It's a while since I looked at this so I'm not entirely sure what the "FilterChildRecords" does in relationship to the Country state relationship.&lt;/P&gt;&lt;P&gt;I hope this helps&lt;/P&gt;&lt;P&gt;Peter</description><pubDate>Thu, 29 May 2008 23:30:08 GMT</pubDate><dc:creator>Peter Denton</dc:creator></item><item><title>RE: Filtering second RepositoryItemLookUpEdit based on value in the first one.</title><link>http://forum.strataframe.net/Topic16697-7-1.aspx</link><description>[quote]Thanks for your prompt reply anyway.. I know I can count on you guys when it DOES involve  your product[/quote]&lt;/P&gt;&lt;P&gt;Thanks for your kind words....we try anyway :)</description><pubDate>Thu, 29 May 2008 15:54:58 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Filtering second RepositoryItemLookUpEdit based on value in the first one.</title><link>http://forum.strataframe.net/Topic16697-7-1.aspx</link><description>No problem Trent... I knew you guys didnt do much with it... I was addressing the masses... ;-) &lt;/P&gt;&lt;P&gt;Thanks for your prompt reply anyway.. I know I can count on you guys when it DOES involve  your product. :-D</description><pubDate>Thu, 29 May 2008 15:51:26 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Filtering second RepositoryItemLookUpEdit based on value in the first one.</title><link>http://forum.strataframe.net/Topic16697-7-1.aspx</link><description>This should have nothing at all to do with SF or a bound BO...this relates to how the grid will behave or react...we don't use DevExpress controls (aside from creating the wrapper), so without going and setting up a sample, I won't be able to give you much direction, sorry :ermm:</description><pubDate>Thu, 29 May 2008 15:48:42 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Filtering second RepositoryItemLookUpEdit based on value in the first one.</title><link>http://forum.strataframe.net/Topic16697-7-1.aspx</link><description>I have two RepositoryItemLookUpEdits in an XtraGrid... How do I filter the second RepositoryItemLookUpEdit based on the selection I made in the first one?&lt;br&gt;&lt;br&gt;This is what I found on DevExpress' website but I'm not sure I understand this or that this would be the best way given the fact that i am using StrataFrame and BOs.&lt;br&gt;&lt;br&gt;http://www.devexpress.com/Support/Center/KB/p/A237.aspx?searchtext=filter+repositoryitemlookupedit&amp;tid=4b2d6f97-c4ae-48fc-87f6-8c5da6541e40&amp;pid=-1&lt;br&gt;&lt;br&gt;P.S. I know this isnt exactly your product but I thought somebody in here has done this. :-D</description><pubDate>Thu, 29 May 2008 15:34:16 GMT</pubDate><dc:creator>StarkMike</dc:creator></item></channel></rss>