﻿<?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 » WinForms (How do I?)  » Errr on Changing DBFieldName to get readable propertyName</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 08 Sep 2026 16:09:16 GMT</lastBuildDate><ttl>20</ttl><item><title>Errr on Changing DBFieldName to get readable propertyName</title><link>http://forum.strataframe.net/FindPost14384.aspx</link><description>I've followed the process below ;&lt;/P&gt;&lt;P&gt;Using Object Mapper , Select the field and press Customize,&lt;/P&gt;&lt;P&gt;Check Use Custom Code and Create Descriptor,&lt;/P&gt;&lt;P&gt;Paste the&amp;nbsp;code (Change only cust_firstname to FirstName) below in the custom code section;&lt;/P&gt;&lt;P&gt;I've got the error below.&lt;/P&gt;&lt;P&gt;"An error occurred while refreshing the data from field 'CustomerBase.FirstName' to property 'Text' on control 'TextEdit1.'&amp;nbsp; Are you missing FieldPropertyDescriptor for a custom property?"&lt;/P&gt;&lt;P&gt;&amp;nbsp;But this is not custom property. What is missing ?&lt;/P&gt;&lt;FONT size=1&gt;&lt;P&gt;----------------&lt;/P&gt;&lt;P&gt;&amp;lt;Browsable(&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;False&lt;/FONT&gt;&lt;FONT size=1&gt;), _&lt;/P&gt;&lt;P&gt;BusinessFieldDisplayInEditor(), _&lt;/P&gt;&lt;P&gt;Description("cust_FirstName"), _&lt;/P&gt;&lt;P&gt;DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)&amp;gt; _&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;Public&lt;/FONT&gt;&lt;FONT size=1&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;Property&lt;/FONT&gt;&lt;FONT size=1&gt; [FirstName]() &lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;As&lt;/FONT&gt;&lt;FONT size=1&gt; System.&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;String&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;Return&lt;/FONT&gt;&lt;FONT size=1&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;CType&lt;/FONT&gt;&lt;FONT size=1&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;Me&lt;/FONT&gt;&lt;FONT size=1&gt;.CurrentRow.Item("cust_FirstName"), System.&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;String&lt;/FONT&gt;&lt;FONT size=1&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;End&lt;/FONT&gt;&lt;FONT size=1&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;Get&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;Set&lt;/FONT&gt;&lt;FONT size=1&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;ByVal&lt;/FONT&gt;&lt;FONT size=1&gt; value &lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;As&lt;/FONT&gt;&lt;FONT size=1&gt; System.&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;String&lt;/FONT&gt;&lt;FONT size=1&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;Me&lt;/FONT&gt;&lt;FONT size=1&gt;.CurrentRow.Item("cust_FirstName") = value&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;End&lt;/FONT&gt;&lt;FONT size=1&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;Set&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=1&gt;I've &lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&amp;nbsp;</description><pubDate>Fri, 15 Feb 2008 15:09:59 GMT</pubDate><dc:creator>Ertan Deniz</dc:creator></item><item><title>RE: Errr on Changing DBFieldName to get readable propertyName</title><link>http://forum.strataframe.net/FindPost14408.aspx</link><description>:D Got it. I'm crossing my fingers!</description><pubDate>Fri, 15 Feb 2008 15:09:59 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Errr on Changing DBFieldName to get readable propertyName</title><link>http://forum.strataframe.net/FindPost14405.aspx</link><description>[quote]How "future"? I've run into another instance were this would be really, really handy (inserting the user friendly field name into broken rule messages). [/quote]&lt;/P&gt;&lt;P&gt;Depending on the complications, this &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;may&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; be in the 1.6.5 build....emphasis on "maybe." :)</description><pubDate>Fri, 15 Feb 2008 13:28:14 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Errr on Changing DBFieldName to get readable propertyName</title><link>http://forum.strataframe.net/FindPost14400.aspx</link><description>[quote]This is already on an enhancement list for a future release.[/quote]&lt;br&gt;
&lt;br&gt;
How "future"?  I've run into another instance were this would be really, really handy (inserting the user friendly field name into broken rule messages).</description><pubDate>Fri, 15 Feb 2008 10:54:49 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Errr on Changing DBFieldName to get readable propertyName</title><link>http://forum.strataframe.net/FindPost14393.aspx</link><description>New feature is simply implement by getting friendly name for the field. Then generate according to this.&lt;/P&gt;&lt;P&gt;There must be no need to write anything.&lt;/P&gt;&lt;P&gt;My situation works well. I've have pasted standart property code with changed name into custom code, not selected the option 'Create descriptor' and written code that overrides GetCustomBindablePropertyDescriptors for the property.</description><pubDate>Fri, 15 Feb 2008 01:25:38 GMT</pubDate><dc:creator>Ertan Deniz</dc:creator></item><item><title>RE: Errr on Changing DBFieldName to get readable propertyName</title><link>http://forum.strataframe.net/FindPost14391.aspx</link><description>I think that you are wanting a feature in the BO Mapper that will allow you to override the name of the field without having to create a custom property for each item...I think :)&amp;nbsp; This is already on an enhancement list for a future release.&amp;nbsp; Past that, if you want to send me a sample to reproduce what you are talking about then that would be great.&amp;nbsp; I am having a hard time following what you are getting at here.&amp;nbsp; Thanks.</description><pubDate>Thu, 14 Feb 2008 14:03:20 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Errr on Changing DBFieldName to get readable propertyName</title><link>http://forum.strataframe.net/FindPost14390.aspx</link><description>I've used Custom Code option. Copy the only property related code from (designer.vb) and paste it into Custom code section.&lt;/P&gt;&lt;P&gt;In Custom code section, I've changed property name to a more readable form, Then build partial class. I've also added an &lt;SPAN class=FormTextHighlight&gt;override&lt;/SPAN&gt; for the &lt;SPAN class=FormTextHighlight&gt;GetCustomBindablePropertyDescriptors()&lt;/SPAN&gt; function. But I've got known error. This was my process.&lt;/P&gt;&lt;P&gt;I want to use the property (with new name) generated by Mapper. I don't want to define new custom properties for each field. This is the my case. &lt;/P&gt;&lt;P&gt;I've seen that If Only property descriptor&amp;nbsp;was pasted into custom code region, field descriptor class remained the same with old property names after generation.</description><pubDate>Thu, 14 Feb 2008 09:33:18 GMT</pubDate><dc:creator>Ertan Deniz</dc:creator></item><item><title>RE: Errr on Changing DBFieldName to get readable propertyName</title><link>http://forum.strataframe.net/FindPost14387.aspx</link><description>[quote] with functions GetValue and SetValue (designer.vb). Because, I've changed cust_FirstName to FirstName by Custom Code.[/quote]&lt;/P&gt;&lt;P&gt;It sounds as though you have answered your own question here.&amp;nbsp; A property descriptor is created by the BO Mapper for each field.&amp;nbsp; If you do not want to use the property name assigned by the schema of the table and create a custom property, then either create a separate property or use the custom code option in the BO Mapper.&amp;nbsp; You can then manually add a ReflectionPropertyDescriptor by overriding the GetCustomBindablePropertyDescriptors method of the BO.&amp;nbsp; There are many posts related to this:&lt;/P&gt;&lt;P&gt;&lt;A href="http://forum.strataframe.net/FindPost13027.aspx"&gt;http://forum.strataframe.net/FindPost13027.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forum.strataframe.net/FindPost3584.aspx"&gt;http://forum.strataframe.net/FindPost3584.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is also documentation in this regard.&amp;nbsp; But if you just go and start changing the generated field name without using the "custom code" option in the mapper, then you are going to have downstream effects like this.</description><pubDate>Thu, 14 Feb 2008 09:09:18 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Errr on Changing DBFieldName to get readable propertyName</title><link>http://forum.strataframe.net/FindPost14385.aspx</link><description>When Create Descriptor option is selected in ObjectMapper, I've got syntax error (member not found) with functions GetValue and SetValue (designer.vb). Because, I've changed cust_FirstName to FirstName by Custom Code.&lt;/P&gt;&lt;P&gt;Public Overrides Function GetValue(ByVal component As Object) As Object&lt;/P&gt;&lt;P&gt;Return CType(component, CustomerBase).&lt;FONT color=#dd1111&gt;cust_FirstName&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;P&gt;Public Overrides Sub SetValue(ByVal component As Object, ByVal Value As Object)&lt;/P&gt;&lt;P&gt;CType(component, CustomerBase).&lt;FONT color=#dd1111&gt;cust_FirstName&lt;/FONT&gt; = CType(Value, System.String)&lt;/P&gt;&lt;P&gt;End Sub</description><pubDate>Thu, 14 Feb 2008 07:20:24 GMT</pubDate><dc:creator>Ertan Deniz</dc:creator></item></channel></rss>