﻿<?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?)  » Override Property Setter</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Thu, 17 Sep 2026 18:29:04 GMT</lastBuildDate><ttl>20</ttl><item><title>Override Property Setter</title><link>http://forum.strataframe.net/FindPost7222.aspx</link><description>Hello all,&lt;/P&gt;&lt;P&gt;Is there a way to override a BO property Setter?&amp;nbsp; I have tried copying the Property I want to modify into the BO.vb (not the designer file) and apply Overrides to the public property method.&amp;nbsp; This of course does not compile since the base property is not overridable.&lt;/P&gt;&lt;P&gt;What I would like to do is if a value is changed, automatically UPPERCASE and PadLeft(3) the field, plus call a function to set another field:&lt;/P&gt;&lt;P&gt;Example Setter:&lt;/P&gt;&lt;P&gt;Me.CurrentRow.Item("HairColor") = value.ToUpper.PadLeft(3)&lt;BR&gt;Me.HairColorDescription = GetLookupItem(DepartmentID, TableNumber, Me.CurrentRow.Item("HairColor"))&lt;/P&gt;&lt;P&gt;My initial thought was to UpperCase and Pad the field in the CheckRulesOnCurrentRow event.&lt;/P&gt;&lt;P&gt;Me.HairColor = Me.HairColor.ToUpper.PadLeft(3) !Pad left for sorting purposes&lt;BR&gt;Me.HairColorDescription = GetLookupItem(DepartmentID, TableNumber, Me.HairColor)&lt;/P&gt;&lt;P&gt;The above works.&amp;nbsp; However as I navigate through the records (even after copying the code to the BO Navigated event), the description seems to always be one behind the current record.&amp;nbsp; Custom fields and property descriptions have been setup and work so this is not the issue either.&lt;/P&gt;&lt;P&gt;Ideas?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Ben</description><pubDate>Thu, 01 Mar 2007 11:27:32 GMT</pubDate><dc:creator>Ben Kim</dc:creator></item><item><title>RE: Override Property Setter</title><link>http://forum.strataframe.net/FindPost7237.aspx</link><description>Yes.&amp;nbsp; However I had issues after doing so.&amp;nbsp; The editing state of the form seemed to screw up and the lookup did not happen at all when I moved my code to the "property setter/getter" area.&lt;/P&gt;&lt;P&gt;I reverted my code back to the original form...&amp;nbsp; Handle trimming/padding in the CheckRulesOnCurrentRow, and all calls to lookup descriptions for "codes" are done back in the Maintenance Form now.&amp;nbsp; All is well now... No more "EditingState" errors ;-)&lt;/P&gt;&lt;P&gt;Ben</description><pubDate>Thu, 01 Mar 2007 11:27:32 GMT</pubDate><dc:creator>Ben Kim</dc:creator></item><item><title>RE: Override Property Setter</title><link>http://forum.strataframe.net/FindPost7236.aspx</link><description>Do you put the entire property statement in the custom code box (i.e. Public Property MyField() As Integer...etc.)? Or just get/set statements?</description><pubDate>Thu, 01 Mar 2007 11:19:17 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Override Property Setter</title><link>http://forum.strataframe.net/FindPost7223.aspx</link><description>You can customize the field through the BOMapper and paste your code into the custom code field.&amp;nbsp; Then, when the partial class is built, the BOMapper will spit out the custom code rather than the generated code for that property.&amp;nbsp; You can also choose custom code and just put a comment or a couple line breaks in the custom code box and just put your property in the main code file.</description><pubDate>Wed, 28 Feb 2007 14:54:14 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>