﻿<?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 / Business Objects and Data Access (How do I?)  / How do I filter a business object by a custom property? / 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, 07 Oct 2008 09:23:44 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Since the form's purpose is to display information only, I set the AutoShowSaveChangesMessage on the maintenance form to 'false.'  That took care of it.</description><pubDate>Fri, 27 Jun 2008 11:43:14 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Glad you got it going, Bill! ;)&lt;P&gt;[quote]There are a couple of outstanding issues...the main one is that once I set a column's value in the CurrentDataTable the row is now dirty and the BO wants to save whenever I exit the &amp;#119;indow.[/quote]&lt;/P&gt;&lt;P&gt;Not sure this is the recommended way, I'm sure you will be adviced against it if not. Have you tryed issuing a SAVE right after you modifiy all your custom field values? This is what I'm doing, anyway! :)&lt;/P&gt;&lt;P&gt;As this column is not part of your table, nothing will happen to it, I suppose.</description><pubDate>Fri, 27 Jun 2008 11:06:49 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>I thought I would try to wrap up this thread with a play-by-play of what I did to solve the problem.  Thanks [b]everyone[/b] for all of the help!&lt;/P&gt;&lt;P&gt;[hr]&lt;/P&gt;&lt;P&gt;1)  Added code to the CurrentDataTableInitialized and CurrentDataTableRefilled (per Trent and Ivan)&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; (CurrentDataTable.Columns[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"spxInventoryQty"&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;] == &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;) { CurrentDataTable.Columns.Add(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;DataColumn&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"spxInventoryQty"&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;typeof&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;decimal&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;))); }&lt;/FONT&gt;&lt;/FONT&gt;[/codesnippet]&lt;P&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;2)  Altered the custom property to a basic structure (no reference to the new column)&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;[&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&amp;lt;snipped&amp;gt;&lt;/FONT&gt;&lt;FONT size=2&gt;]&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;decimal&lt;/FONT&gt;&lt;FONT size=2&gt; InventoryQty&lt;BR&gt;{&lt;BR&gt;    &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;get&lt;BR&gt;    &lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;        &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;decimal&lt;/FONT&gt;&lt;FONT size=2&gt; mInvQty = 0;&lt;BR&gt;        &lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// calculate the amount on hand (pending)&lt;BR&gt;        &lt;/FONT&gt;&lt;FONT size=2&gt;mInvQty = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.onhandqty; &lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// use the invalid value for now (for testing)&lt;BR&gt;        &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; mInvQty;&lt;BR&gt;    }&lt;BR&gt;}&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;3)  Filled the BO that applies a similar filter to what I wanted in the BO (removed that part of the problem entirely)&lt;/P&gt;&lt;P&gt;4)  Set all new data column values to the existing value of the custom property (note: using the various code supplied in this thread, the best I could do was fill the first row with data from the custom properties...the rows' column data mostly stayed empty)&lt;/P&gt;&lt;P&gt;[codesnippet]&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;void&lt;/FONT&gt;&lt;FONT size=2&gt; SetColumnValues()&lt;BR&gt;{&lt;BR&gt;    &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;foreach&lt;/FONT&gt;&lt;FONT size=2&gt; (&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;PartsBO&lt;/FONT&gt;&lt;FONT size=2&gt; mBO &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;FONT size=2&gt; partsBO1.GetEnumerable())&lt;BR&gt;    {&lt;BR&gt;        partsBO1.CurrentDataTable.Rows[partsBO1.CurrentRowIndex][&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"spxInventoryQty"&lt;/FONT&gt;&lt;FONT size=2&gt;] = partsBO1.InventoryQty;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;    }&lt;BR&gt;}&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;5)  Create a dataset from the CurrentDataTable(s) to be the data source for the DevEx Grid (necessary for the master/detail gridviews, BBS bypassed)&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#2b91af size=2&gt;DataSet&lt;/FONT&gt;&lt;FONT size=2&gt; ds = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;DataSet&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;BR&gt;ds.Tables.Add(partsBO1.CurrentDataTable);&lt;BR&gt;ds.Tables.Add(salesOrderDetailsBO1.CurrentDataTable);&lt;BR&gt;ds.Relations.Add(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"SalesOrders"&lt;/FONT&gt;&lt;FONT size=2&gt;, ds.Tables[0].Columns[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"partindex"&lt;/FONT&gt;&lt;FONT size=2&gt;], ds.Tables[1].Columns[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"partindex"&lt;/FONT&gt;&lt;FONT size=2&gt;], &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;PartsGridControl.DataSource = ds.Tables[0];&lt;BR&gt;PartsGridControl.LevelTree.Nodes.Add(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"SalesOrders"&lt;/FONT&gt;&lt;FONT size=2&gt;, SalesOrderView);&lt;BR&gt;PartsGridControl.RefreshDataSource();&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;[hr]&lt;/P&gt;&lt;P&gt;There are a couple of outstanding issues...the main one is that once I set a column's value in the CurrentDataTable the row is now dirty and the BO wants to save whenever I exit the &amp;#119;indow.  I will do some searching on how to prevent saves in this situation.  I am sure it has been covered in the docs or other forum entries.  The secondary one is that the lookup data in the related sales order grid (e.g. customer name, unit description, etc.) is always empty.  Since this is new water for me, I will do my due diligence and research the DevEx grid more throroughly and come up with a solution.&lt;/P&gt;&lt;P&gt;Thanks, again, for everyone's help!  Naturally, if anyone sees something that may help me improve things, feel free to let me know.&lt;/P&gt;&lt;P&gt;Have a great day!&lt;BR&gt;Bill</description><pubDate>Fri, 27 Jun 2008 10:21:26 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Thanks for reviewing the code, Ivan.  Yup, just left it out, since I am replacing it with the newer properties that I shared with you.</description><pubDate>Thu, 26 Jun 2008 16:13:37 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Hey Bill.&lt;/P&gt;&lt;P&gt;Don't even know wether this would make a difference or not, but had a look at your code and couldn't see the "OnSalesOrder" property defined (which you create a Descriptor for)... I guess you just didn't post it, is that so?</description><pubDate>Thu, 26 Jun 2008 16:08:03 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>[quote][b]Paul Chase (06/26/2008)[/b][hr]If your customer property work's fine with textbox's but not with a BBS then what does that tell you?[/quote]&lt;/P&gt;&lt;P&gt;I am focusing on the BBS, as mentioned in an earlier post (following Greg's suggestion to return a constant).  My biggest issue is why the code works for one grid and not another.  Both have BOs with custom properties flowing through a BBS to the grid.&lt;/P&gt;&lt;P&gt;I'll continue to grind it out on my own.  Apparently, I have worn y'all out with this one.  &lt;/P&gt;&lt;P&gt;Sorry about that,&lt;BR&gt;Bill</description><pubDate>Thu, 26 Jun 2008 16:06:11 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>If your customer property work's fine with textbox's but not with a BBS then what does that tell you?</description><pubDate>Thu, 26 Jun 2008 15:58:59 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>[quote][b]Trent L. Taylor (06/26/2008)[/b][hr]Also, if you read Ivan's post, he has posted some code that shows an example of how to setup the basic structure of this custom property.  If you backup and start with his code, you are going to be a long way down the road.[/quote]&lt;/P&gt;&lt;P&gt;Were you able to review the code that I posted?  Other than the initialize and refilled code, I didn't think I was that far off.  Maybe I am.&lt;/P&gt;&lt;P&gt;At this point, I am just wanting a simple value to show up in the grid from a custom property.  Not even worried about filtering for now.</description><pubDate>Thu, 26 Jun 2008 15:54:00 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>&lt;IMG src="http://forum.strataframe.net/Uploads/Images/49d2beee-96be-4a97-a190-2bcb.JPG"&gt;&lt;/P&gt;&lt;P&gt;The three columns (which are blank) are dragged from the available columns in the BBS to the layout of the grid.  All three are read-only custom properties that return a constant (3, 2, 1, respectively; no complex logic, at all, per Greg).   I have done nothing else.&lt;/P&gt;&lt;P&gt;You can see from my attached code earlier that I indeed have the proper ReflectionPropertyDescriptors set for each custom property.  Otherwise, these properties wouldn't even be seen by the grid design tool via the BBS.&lt;/P&gt;&lt;P&gt;I'll re-re-re-read everything, Trent.  I am not ignoring anyone's counsel.  I have acted on every part.&lt;/P&gt;&lt;P&gt;(I haven't found any towels, yet)&lt;BR&gt;Bill</description><pubDate>Thu, 26 Jun 2008 15:51:10 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Also, if you read Ivan's post, he has posted some code that shows an example of how to setup the basic structure of this custom property.  If you backup and start with his code, you are going to be a long way down the road.</description><pubDate>Thu, 26 Jun 2008 15:40:57 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>BILL, if you would read my previous post, there is &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;ONLY&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; one reason it would not show up in a grid through a BBS.  You are missing a property descriptor for the custom property...period!&lt;/P&gt;&lt;P&gt;You may be dealing with post and information overload, but this is not an overly complicated process or problem...when I run into something like this it is generally due to frustration and dealing with the same problem over a period of time.  There is a lot of good information in this thread...but first things first, I had posted explaining how to ensure the column always exists within the CurrentDataTable.  Secondly, I have told you the one and only reason why a custom property would not be visible through the BBS.  Please check and refer to these two points and I am sure that you will see where your problem is.</description><pubDate>Thu, 26 Jun 2008 15:38:09 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Paul:  I have a very similar setup on my InvoiceBO with the [invoicetotal] field.  It is a custom property and displays nicely on a grid via a BBS.  I am mimicking much of what I did there within this current BO.&lt;/P&gt;&lt;P&gt;Greg:  I returned only a constant and the value still are not showing up in the grid.  Disturbing.  For some reason, as Paul is alluding to, the BBS is not picking up these values and passing them to the grid.&lt;/P&gt;&lt;P&gt;Guys...thanks for all of the help.  I am hitting the 24 hour mark on this current problem.  Hopefully, it will get resolved soon.  &lt;/P&gt;&lt;P&gt;Btw, I have eliminated any column adding and filtering options...I need to get the data flowing first to the grid.  I will go from there once that is back in business.</description><pubDate>Thu, 26 Jun 2008 15:29:21 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Bill,&lt;br&gt;&lt;br&gt;You might try doing something real simply like just returning a constant, bypassing all the code in you properties to see if that works. i.e. &lt;br&gt;[codesnippet]       public decimal spxSalesOrderQty&lt;br&gt;        {&lt;br&gt;            get&lt;br&gt;            {&lt;br&gt;                // just skip the rest for now&lt;br&gt;                return 1;&lt;br&gt;&lt;br&gt;                decimal mSOQty = 0;&lt;br&gt;                ...rest of code untouched&lt;br&gt;            }&lt;br&gt;        }&lt;br&gt;[/codesnippet]&lt;br&gt;&lt;br&gt;If this works, then it has something to do with the property code. If it doesn't, then is has to do with the properties themselves or how the grid is using those properties.</description><pubDate>Thu, 26 Jun 2008 14:59:41 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>That is good, if it work's without the BBS then you know it is a BBS issue and not a business object issue. &lt;/P&gt;&lt;P&gt;What happens when you use a BBS is that it creates a new instance of the busines object for every row. However it does not carry over any custom properties etc that are to the new instance.for instance if you have a property called foo in you business object and its value has been set to "Something" what the business binding source create a new instance of the Bo for that row the property foo's value with be nothing.&lt;/P&gt;&lt;P&gt;If that is what is happening then you can fix it by creating a BBS that is customized to your business object type. If you rthink this is where your problem is i can send you a copy of one I modified.&lt;/P&gt;&lt;P&gt;Paul</description><pubDate>Thu, 26 Jun 2008 14:53:29 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Hi Ivan,&lt;/P&gt;&lt;P&gt;Thanks for the input.  The only real difference is that my properties are read-only; therefore, no [i]set[/i] portion.  I have done exactly what you did...except I did not put the add column code in [i]both[/i] methods of the BO (initialize and refilled).  I will try that.&lt;/P&gt;&lt;P&gt;Bill</description><pubDate>Thu, 26 Jun 2008 14:37:52 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>With the textboxes, the values are showing up properly as I navigate through the BO.&lt;/P&gt;&lt;P&gt;The grid has a BBS datasource that points to the exact same BO.  All of the fields in the grid are blank.&lt;/P&gt;&lt;P&gt;(preparing to look for a towel to throw in)</description><pubDate>Thu, 26 Jun 2008 14:20:47 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Hey Bill.&lt;P&gt;Just in case it might help you see what Trent told you about adding a new field to your table and filtering on it, here is some code of mine where I do exactly the same, filtering on a field that doesn't exist on the underlying table.&lt;/P&gt;&lt;P&gt;On your BO:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;P&gt;    Private Sub MyBO_CurrentDataTableRefilled() Handles MyBase.CurrentDataTableRefilled&lt;BR&gt;        If Me.CurrentDataTable.Columns.Contains("myField") = False Then&lt;BR&gt;            Me.CurrentDataTable.Columns.Add("myField", System.Type.GetType("System.Boolean"))&lt;BR&gt;        End If&lt;BR&gt;    End Sub&lt;/P&gt;&lt;P&gt;    Private Sub MyBO_CurrentDataTableInitialized() Handles MyBase.CurrentDataTableInitialized&lt;BR&gt;        If Me.CurrentDataTable.Columns.Contains("myField") = False Then&lt;BR&gt;            Me.CurrentDataTable.Columns.Add("myField", System.Type.GetType("System.Boolean"))&lt;BR&gt;        End If&lt;BR&gt;    End Sub&lt;BR&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;And, of course, the property:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;P&gt;    &amp;lt;Browsable(False), _&lt;BR&gt;     BusinessFieldDisplayInEditor(), _&lt;BR&gt;     Description("My property"), _&lt;BR&gt;     DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)&amp;gt; _&lt;BR&gt;    Public Property [myFieldProperty]() As Boolean&lt;BR&gt;        Get&lt;BR&gt;            Dim loValue As Object&lt;BR&gt;            loValue = Me.CurrentRow.Item("myField")&lt;BR&gt;            If loValue Is DBNull.Value Then&lt;BR&gt;                Return False&lt;BR&gt;            Else&lt;BR&gt;                Return CBool(Me.CurrentRow.Item("myField"))&lt;BR&gt;            End If&lt;BR&gt;        End Get&lt;BR&gt;        Set(ByVal value As Boolean)&lt;BR&gt;            Me.CurrentRow.Item("myField") = value&lt;BR&gt;        End Set&lt;BR&gt;    End Property&lt;/P&gt;&lt;P&gt;&lt;BR&gt;    Protected Overrides Function GetCustomBindablePropertyDescriptors() As MicroFour.StrataFrame.Business.FieldPropertyDescriptor()&lt;BR&gt;        '-- Create and return a new array of FieldPropertyDescriptor&lt;BR&gt;        ' objects that contains the ReflectionPropertyDescriptor&lt;BR&gt;        ' for the cas_Idade field.&lt;BR&gt;        Return New MicroFour.StrataFrame.Business.FieldPropertyDescriptor() { _&lt;BR&gt;            New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor("myFieldProperty", GetType(MyBO))}&lt;BR&gt;    End Function&lt;BR&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;So, now, on my logic, after setting my field depending on conditions:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;/P&gt;&lt;P&gt;        '-- applies the filter&lt;BR&gt;        Me.MyBO1.Filter = "myField = True"&lt;BR&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Hope it helps in some way...</description><pubDate>Thu, 26 Jun 2008 14:19:20 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Bill,&lt;/P&gt;&lt;P&gt;Try taking the business binding source out of the equation, just throw a few text boxes on a form bound to your business object custom properties  fill it and navigate through your record set and see if it works. &lt;/P&gt;&lt;P&gt;The business binding source can create some serious migraine style headaches as it creates a new instance of the business object for each row so some things that have been set in the original BO are not longer "set" in the newly created bo.. Try it withough the BBS and see if your logic works. &lt;/P&gt;&lt;P&gt;If it works without the BBS in the middle then you can play doctor with the BBS source code and create a BBS specific to the business object you are binding to.&lt;/P&gt;&lt;P&gt;Paul</description><pubDate>Thu, 26 Jun 2008 14:05:26 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Here is my actual custom property code.  Please criticize at will.  I have no other code reviewer here.  There has got to be something fundamentally wrong with what I am doing so that none of the custom properties values are showing up in a DevEx XtraGrid (via BBS).  I have done this with several other BOs so the process is not new to me.  &lt;/P&gt;&lt;P&gt;From these custom properties, I would like to filter the grid on the spxRequiredQty value.  Somehow, I have to tell the underlying table of the BO that the column exists and what the data actually is (without resorting to stored procs and such).  &lt;/P&gt;&lt;P&gt;I know I am being difficult with this.  I have tried so many things that all of this is becoming a blur.  I have read through this thread several times, but just cannot see the light.  Thought I did a few times, but it was just that proverbial debug train coming at me through the tunnel of code exceptions.&lt;/P&gt;&lt;P&gt;Bill&lt;/P&gt;&lt;P&gt;P.S. Still using SQL Server 2000.  :blush:</description><pubDate>Thu, 26 Jun 2008 14:05:22 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>One other point that I saw in regards to your grid...if you do not have a custom property descriptor setup, it will not show up in a grid.  You will need to override the GetCustomBindablePropertyDescriptors method on the BO and provide a ReflectionPropertyDescriptor.</description><pubDate>Thu, 26 Jun 2008 14:04:34 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Bill,&lt;/P&gt;&lt;P&gt;I think that you are trying to make this too complicated.  I think that I would first backup and then start rethinking through your process.&lt;/P&gt;&lt;P&gt;First, we use custom columns as aggregates OR create a custom property that dynamically returns aggregates a lot.  Now since you are trying to apply a filter, then you will most likely want a column in the data table.&lt;/P&gt;&lt;P&gt;OK.  Since we have that established, from what I can understand, you always want to have a calculated column within your data table.  So obviously if you perform a query, then you can do this as part of the query (easier and faster in some cases).  However, if you will have a scenario that will not retrieve data from a database query first, then you would need to ensure that the column gets manually added prior to being refrenced or accessed.  So in this case, I would do one of two things to ensure that the column exists within the BO.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Override the OnAfterAddNew method of the BO and ensure that the desired columns get added within the BO and/or exist when a new record is added.  This way a query is not required, but when you add a new record the BO will ensure that the column exists.&lt;/LI&gt;&lt;LI&gt;Override the OnCurrentDataTableRefilled method of the BO and call the same logic that is added as part of the OnAfterAddNew method.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;By doing the above two things you will always be ensured that you have the column within your data table, thus allowing a filter to be applied.&lt;/P&gt;&lt;P&gt;At this point, you will just create the custom property on the BO to access it through the strong-typed reference, but you can then treat this column just as though you could any other column that comes from the database, however, it just resides within the BO.</description><pubDate>Thu, 26 Jun 2008 13:56:42 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Some more thoughts (do I smell something burning?)....:P&lt;br&gt;&lt;br&gt;The second option is basically the first, just using a method to do the walking and loading, rather than the custom property...probably won't be any good in your situation either. I'd also try to find out why it takes so long...maybe there is something you could do to speed it up. Unless the data set is very large and/or the computation very complicated, this should be fast.&lt;br&gt;&lt;br&gt;For the third option, if you are using SQL Server 2005, consider a CLR sproc.  You program in the .NET language of choice (C# for you I believe) and they tend to be fast.  You likely could get a several minute process down to milliseconds. Search the forum for CLR stored procedures, there are some good posts about them by the SF team.  While I agree that placing code in BOs is the way to go, when I need speed for a data intensive process, I use SQL Server.  Now, sometimes, I can get the SQL Server joy AND put the code in the BO.  That command object can accept any sort of SQL.  I.e. you can do the work on SQL server but put the code (SQL script) in your BO.  This won't be as fast as a sproc (the execution plan isn't precompiled and cached on SQL Server), but might do the trick.&lt;br&gt;&lt;br&gt;If your custom properties aren't showing up, my first guess would be that you forgot to setup the custom property descriptors, but I'm still a newbie when it comes to grids so not sure if they are used in that case...  :(&lt;br&gt;&lt;br&gt;Good luck and remember to wear your fire retardant pants!  :w00t:</description><pubDate>Thu, 26 Jun 2008 13:41:14 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Fascinating.  Bewildering.  Frustrating.&lt;/P&gt;&lt;P&gt;There are three custom properties and one additional column (for the filter).  Prop3 = Prop2 - Prop1 (basically), then ColumnA = Prop3.  Filter ColumnA so that only values greater than 0 are shown.&lt;/P&gt;&lt;P&gt;[quote]in your fill method, you could loop through the BO and fill the column by accessing the custom property[/quote]&lt;/P&gt;&lt;P&gt;Looping through the BO is very time consuming...several minutes to kerchunk each custom prop, then display the grid.  Not a good option.  In addition, the filter did not work even though the column has data!  It shows on the grid.  None of the custom properties show up on the grid...all blank still.&lt;/P&gt;&lt;P&gt;[quote]use a method that would fill that column (after adding it) (rather than using the custom property).[/quote]&lt;/P&gt;&lt;P&gt;That seems to only affect the first row of the BO.  &lt;/P&gt;&lt;P&gt;Both of these last two options made the BO dirty.  Closing the window asked me if I want to save changes.&lt;/P&gt;&lt;P&gt;[quote]have SQL do the work and return that column[/quote]&lt;/P&gt;&lt;P&gt;This is an option (and I have done this for several other BOs)...but, the complexity of the stored procs and UDFs would make the process so slow and painful that it just isn't fun anymore.  Placing the complex code inside of custom class and/or business object really, really makes things a LOT easier (cleaner and neater, too).  &lt;/P&gt;&lt;P&gt;Well, back to the drawing board.  And, in the immortal words of Bill the Cat:&lt;/P&gt;&lt;P&gt;ACK!</description><pubDate>Thu, 26 Jun 2008 13:07:10 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>The fire is already crackling loudly under my feet.  I'll go through those ideas in no particular order.  :)&lt;/P&gt;&lt;P&gt;Thanks a ton, Greg!&lt;BR&gt;Bill</description><pubDate>Thu, 26 Jun 2008 12:43:22 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Well, you need to have data in the colReqQty for the filter to work, but your only filling it if/when the custom property is being accessed.  Time to rethink this, I'd think  ;)&lt;br&gt;&lt;br&gt;Here are some ideas (in no particular order):&lt;br&gt;- in your fill method, you could loop through the BO and fill the column by accessing the custom property&lt;br&gt;- use a method that would fill that column (after adding it) (rather than using the custom property).&lt;br&gt;- have SQL do the work and return that column&lt;br&gt;&lt;br&gt;Just do this before you set the filter.&lt;br&gt;&lt;br&gt;Hope this sparks some ideas (without starting a fire!  :blink: )</description><pubDate>Thu, 26 Jun 2008 12:38:31 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>If I put a break on the first line of the code in the custom property, then run the app and open the window that uses the BO, the code NEVER hits this line:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;decimal&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; mReqQty = (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;.minstocklevel - &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;.onhandqty) + (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;.spxSalesOrderQty - &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;.spxWorkOrderQty);&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;What am I doing wrong?  Since the actual custom property is not getting "filled" then the value of my additional column will never get updated.  Therefore, my filter will not work.&lt;/P&gt;&lt;P&gt;This is just viscious!  &lt;/P&gt;&lt;P&gt;:D  &amp;lt;--- see I am still smiling!!&lt;/P&gt;&lt;P&gt;Perhaps I did not get enough sleep last night.&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 26 Jun 2008 12:26:45 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>I added the code below into the CurrentDataTableRefilled method:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;CurrentDataTable.Columns.Add(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"colReqQty"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;typeof&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;decimal&lt;/FONT&gt;&lt;FONT size=2&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;I am checking for the existence before adding.  I then set a filter on the BO to something like this:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;MyBO.Filter = "colReqQty &amp;gt; 0";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Nothing.  As a matter of fact, I am getting no value for my Custom Property, at all (named "spxRequiredQty").  Here is my code for the custom property:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;[codesnippet]&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;decimal&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; spxRequiredQty&lt;BR&gt;&lt;/FONT&gt;{&lt;BR&gt;    &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;get&lt;BR&gt;    &lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;        &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;decimal&lt;/FONT&gt;&lt;FONT size=2&gt; mReqQty = (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.minstocklevel - &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.onhandqty) + (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.spxSalesOrderQty - &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.spxWorkOrderQty);&lt;BR&gt;        &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (mReqQty &amp;lt; 0) mReqQty = 0;&lt;BR&gt;        &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"colReqQty"&lt;/FONT&gt;&lt;FONT size=2&gt;] = mReqQty;&lt;BR&gt;        &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; mReqQty;&lt;BR&gt;    }&lt;BR&gt;}&lt;BR&gt;&lt;/FONT&gt;[/codesnippet]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;I should be able to see a column called [colReqQty] in my BO; however, it does not show up.  For example, I cannot add it to a grid via a BBS.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;At the moment, I am quite confused.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;:blink:&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 26 Jun 2008 10:46:51 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Thanks, Trent!&lt;/P&gt;&lt;P&gt;Man, I am getting tired...past midnight here.  Still struggling with this, though.  Looks like I will have to get back to this later.  Gotta sleep.&lt;/P&gt;&lt;P&gt;No Mountain Dew in the house.  ;)&lt;/P&gt;&lt;P&gt;I'll get back with you "tomorrow."&lt;BR&gt;Bill</description><pubDate>Wed, 25 Jun 2008 23:16:09 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>You would just want to reference the Item property of the BO or the Item property of the CurrentDataTable.  The example above is just talking to the BO default property which is the Item collection.  When dealing with a default property, you can access on the root of the object like this:&lt;/P&gt;&lt;P&gt;[codesnippet]this["MyAggregateField"] = 1 + 1;[/codesnippet]&lt;/P&gt;&lt;P&gt;or you could talk straight to the current row:&lt;/P&gt;&lt;P&gt;[codesnippet]this.CurrentRow["MyAggregateField"] = 1 + 1;[/codesnippet]</description><pubDate>Wed, 25 Jun 2008 23:01:30 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>[quote]...or in the CurrentDataRefilled event of your BO, you could progammatically add the columns into the CurrentDataTable so that you could filter on this as well:&lt;P&gt;[codesnippet]CurrentDataTable.Columns.Add("MyAggregateField",GetType(Integer))[/codesnippet]&lt;/P&gt;&lt;P&gt;You could then, in your custom property, store off the value in the Set (or even the Get of the proper if it is readonly):&lt;/P&gt;&lt;P&gt;[codesnippet]&amp;lt;Add standard attributes&amp;gt;&lt;BR&gt;Public Readonly Property MyCustomProperty As Integer&lt;BR&gt;   Get&lt;BR&gt;      Me.Item("MyAggregateField") = 1 + 1&lt;BR&gt;      Return CType(me.Item("MyAggregateField"), Integer)&lt;BR&gt;   End Get&lt;BR&gt;End Property[/codesnippet]&lt;/P&gt;&lt;P&gt;Taking this approach you could then sort and filter on the aggregate field.[/quote]&lt;P&gt;Took a while for me to readdress this issue.  I am hitting another brick wall.  I tried adding the column in the method.  If I run a search on the BO, the CurrentDataTable gets refilled again and the column is tried to be readded.  Pop!  Error.  So, I'll check for existence of the column before adding it.&lt;P&gt;Also, setting the aggregate field to the value of the custom property is tripping me up.  Your VB "Me.Item("MyAggregateField")" is not translating for me in my C# world.  Please let me know where I can access that collection(?).  &lt;P&gt;Thanks!!&lt;BR&gt;Bill</description><pubDate>Wed, 25 Jun 2008 22:27:20 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>[quote]Thanks for pulling out the French. English just wasn't getting through to me.[/quote]&lt;br&gt;&lt;br&gt;Ah, I shoulda used French (not that I know much Francaise...)  :P&lt;br&gt;&lt;br&gt;I'm glad the light bulb went off!  &lt;br&gt;&lt;br&gt;Bonne chance!</description><pubDate>Tue, 29 Jan 2008 10:05:44 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>[quote]Thanks for pulling out the French.  English just wasn't getting through to me.[/quote]&lt;/P&gt;&lt;P&gt;No problem :D</description><pubDate>Tue, 29 Jan 2008 09:24:04 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>[quote]Can a user search on these custom fields (e.g. OperatorName="Bill") using the BrowseDialog? [/quote]&lt;/P&gt;&lt;P&gt;No.  The BrowseDialog creates Dynamic queries that are placed against the Database on the server, not the BO.  The BO is not where the query takes place....if you think about it, if the BO were where the query occurred, you would never pull any records back from the server.  So in this instance you will never be able to query on a custom property (unless it has an underlying field on the server that can be queried).</description><pubDate>Tue, 29 Jan 2008 09:19:35 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>[quote][b]Trent L. Taylor (01/29/2008)[/b][hr][quote]...you can, as you have seen from Greg and others, pull a faux field as part of your query...[/quote]&lt;/P&gt;&lt;P&gt;Trent,&lt;/P&gt;&lt;P&gt;I have been known to be quite dense at times.  Sometimes saying something slightly differently fires certain synapses and things start clicking.  For me, it was the word "faux".  Thanks for pulling out the French.  English just wasn't getting through to me.&lt;/P&gt;&lt;P&gt;I will see what I can do with the creation of columns in an sp for the use with my custom properties.  Also, I need to spend some more time with Peter's code.  Looks like a good morning ahead.&lt;/P&gt;&lt;P&gt;Thanks, everyone, for your patience with me.&lt;BR&gt;Bill</description><pubDate>Tue, 29 Jan 2008 09:17:55 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>[quote]I could see an initial speed hit at the time of filling the BO, but not when the user is performing their own sorts, groupings and such on the corresponding DX datagrid.  Would this work?[/quote]&lt;/P&gt;&lt;P&gt;Yes, but this will also make the BO dirty and if you do not want the table to be updated back at the server, you will have to AcceptChanges on the CurrentDataTable...otherwise this will be deleted from the server if a Save() is called:&lt;/P&gt;&lt;P&gt;[codesnippet]MyBo.CurrentDataTable.AcceptChanges()[/codesnippet]</description><pubDate>Tue, 29 Jan 2008 09:16:43 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>[quote][b]Peter Jones (01/28/2008)[/b][hr]...we have quite a number of custom fields...[/quote]&lt;/P&gt;&lt;P&gt;Thanks, Peter!  I will review your code a bit more to see if I may be missing something.  &lt;/P&gt;&lt;P&gt;Can a user search on these custom fields (e.g. OperatorName="Bill") using the BrowseDialog?  Or, could I use code to sort on one of these fields (e.g. myBO.Sort = "INIMaxWeight DESC")?&lt;/P&gt;&lt;P&gt;Regards,&lt;BR&gt;Bill</description><pubDate>Tue, 29 Jan 2008 09:09:29 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>[quote]You and Trent are suggesting that I need to relocate the business logic back into the database.[/quote]&lt;/P&gt;&lt;P&gt;Actually, no.  There has been a lot of good dialog come from this post and this alone should be evident that there are many different ways to approach a problem.  First of all, if you create a custom property and want to sort on that property, there has to be an underlying column in the CurrentDataTable....you can, as you have seen from Greg and others, pull a faux field as part of your query....or in the CurrentDataRefilled event of your BO, you could progammatically add the columns into the CurrentDataTable so that you could filter on this as well:&lt;/P&gt;&lt;P&gt;[codesnippet]CurrentDataTable.Columns.Add("MyAggregateField",GetType(Integer))[/codesnippet]&lt;/P&gt;&lt;P&gt;You could then, in your custom property, store off the value in the Set (or even the Get of the proper if it is readonly):&lt;/P&gt;&lt;P&gt;[codesnippet]&amp;lt;Add standard attributes&amp;gt;&lt;BR&gt;Public Readonly Property MyCustomProperty As Integer&lt;BR&gt;   Get&lt;BR&gt;      Me.Item("MyAggregateField") = 1 + 1&lt;BR&gt;      Return CType(me.Item("MyAggregateField"), Integer)&lt;BR&gt;   End Get&lt;BR&gt;End Property[/codesnippet]&lt;/P&gt;&lt;P&gt;Taking this approach you could then sort and filter on the aggregate field.</description><pubDate>Tue, 29 Jan 2008 09:08:37 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Peter &lt;/P&gt;&lt;P&gt;Thanks so much for an very very useful example.  Coming from a VFP and Visual FoxExpress background I'm very used to thinking in terms of dynamic view parameters and only bringing as many records over the wire as absolutely necessary.  I'm very new to Strataframe and .NET in general and your code has helped a lot to translate some familiar concepts and give me a lot of ideas as to how I want to use the Strataframe framework.&lt;/P&gt;&lt;P&gt;Stuff like this always very much appreciated.  :)</description><pubDate>Mon, 28 Jan 2008 21:15:26 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Hi Bill&lt;/P&gt;&lt;P&gt;[quote]if I am forced to utilize a bank of stored procedures to create every data property of my business object.[/quote]&lt;/P&gt;&lt;P&gt;No need to do this - the proc can return whatever you want. I my example the StationType was just part of the WHERE clause but the value being checked was in an associated table not the PUN table itself.&lt;/P&gt;&lt;P&gt;In our PUN table for example we have quite a number of custom fields:&lt;/P&gt;&lt;P&gt;    Protected Overrides Function GetCustomBindablePropertyDescriptors() As MicroFour.StrataFrame.Business.FieldPropertyDescriptor()&lt;/P&gt;&lt;P&gt;        Dim boPUNType As System.Type = Me.GetType()&lt;/P&gt;&lt;P&gt;        Return New MicroFour.StrataFrame.Business.FieldPropertyDescriptor() { _&lt;BR&gt;             New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;BR&gt;            "OperatorName", boPUNType), _&lt;BR&gt;             New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;BR&gt;            "INIDescription", boPUNType), _&lt;BR&gt;             New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;BR&gt;            "INIMaxHides", boPUNType), _&lt;BR&gt;             New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;BR&gt;            "INIMaxWeight", boPUNType), _&lt;BR&gt;             New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;BR&gt;            "INIMaxArea", boPUNType), _&lt;BR&gt;            New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;BR&gt;            "PKBCode", boPUNType), _&lt;BR&gt;            New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;BR&gt;            "ReceiveBatchCode", boPUNType), _&lt;BR&gt;            New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;BR&gt;            "FlesherBatchCode", boPUNType), _&lt;BR&gt;            New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;BR&gt;            "ShortTermBatchCode", boPUNType), _&lt;BR&gt;            New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;BR&gt;            "TanningBatchCode", boPUNType)}&lt;BR&gt;    End Function&lt;/P&gt;&lt;P&gt;#End Region&lt;/P&gt;&lt;P&gt;Our stored procedures return these values as needed. If we need to add more custom fields we can without breaking any existing code.&lt;/P&gt;&lt;P&gt;Regarding the other question - correct it wouldn't actually delete the rows until you did a BO.Save so you would want to carefull.&lt;/P&gt;&lt;P&gt;The best approach is not to return the data at all.&lt;/P&gt;&lt;P&gt;Cheers, Peter</description><pubDate>Mon, 28 Jan 2008 21:11:01 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item><item><title>RE: How do I filter a business object by a custom property?</title><link>http://forum.strataframe.net/Topic13788-6-1.aspx</link><description>Ah, Greg, much food for thought.  Thanks a ton for the explanation.  &lt;/P&gt;&lt;P&gt;The sp's in my code were placed in there for initial testing and I never removed them.  My goal was to replace them with calls to the corresponding business objects (which were not created at the time--they exist now).  &lt;/P&gt;&lt;P&gt;I am following you.  Really.  The thing that I am tripping up on is that once I give the DB the job of creating my custom properties (which are not custom properties to the business object anymore...they are actually columns in the remote data table) there remains little benefit to be derived from a custom property in the business object itself.&lt;/P&gt;&lt;P&gt;Well, getting late.  Time to go home.  Got an early and long day tomorrow.&lt;/P&gt;&lt;P&gt;Take care,&lt;BR&gt;Bill</description><pubDate>Mon, 28 Jan 2008 20:48:19 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item></channel></rss>