﻿<?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?)  » tying column value to enum in Browse Dialog</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 07:38:21 GMT</lastBuildDate><ttl>20</ttl><item><title>tying column value to enum in Browse Dialog</title><link>http://forum.strataframe.net/FindPost10954.aspx</link><description>I'm trying to tie a column value to an enumeration text value in Browse Dialog result.&lt;FONT size=2&gt;&lt;P&gt;[codesnippet]&lt;/FONT&gt;&lt;/P&gt;&lt;P&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;Enum&lt;/FONT&gt;&lt;FONT size=2&gt; PlanTypes &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;Integer&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;Standard = 0&lt;/P&gt;&lt;P&gt;Interest = 1&lt;/P&gt;&lt;P&gt;Custom = 2&lt;/P&gt;&lt;P&gt;CustomInterest = 3&lt;/P&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;Enum&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;[/codesnippet]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;My bo has a field called plan_type which contains the integer key.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;What value do I change in the RowPopulating&amp;nbsp;event?&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;Thanks.&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 23 Aug 2007 16:12:38 GMT</pubDate><dc:creator>Marcel Heitlager</dc:creator></item><item><title>RE: tying column value to enum in Browse Dialog</title><link>http://forum.strataframe.net/FindPost11039.aspx</link><description>Thanks for the help.&amp;nbsp; What you put in the last post is actually what I wanted to do.</description><pubDate>Thu, 23 Aug 2007 16:12:38 GMT</pubDate><dc:creator>Marcel Heitlager</dc:creator></item><item><title>RE: tying column value to enum in Browse Dialog</title><link>http://forum.strataframe.net/FindPost10964.aspx</link><description>This works the very same way as the ListView.&amp;nbsp; First, have you tried to just allow the enum to populate within it.&amp;nbsp; By default, any strong-typed column using an enum will attempt to perform a ToString which shold return the enum value without you having to do anything in the RowPopulating.&amp;nbsp; However, if you choose to go the RowPopulating route, just set the column that will house this value to PopulatedThroughEvent rather the a formatted value.&amp;nbsp; Then set the event args value when the event is raised:&lt;P&gt;[codesnippet]With CType(e.BusinessObject, MyBOType)&lt;BR&gt;&amp;nbsp;&amp;nbsp; e.Columns(1).DisplayValue = .MyEnumField.ToString()&lt;BR&gt;EndWith[/codesnippet]&lt;P&gt;A better way to parse the enum is to provide an attribute so you can get a more accurate display description:&lt;P&gt;[codesnippet]Public Enum MyEnum As Integer&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MicroFour.StrataFrame.Tools.EnumDisplayValue("Apple", False)&amp;gt; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Item1 = 0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MicroFour.StrataFrame.Tools.EnumDisplayValue("Orange", False)&amp;gt; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Item2 = 1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MicroFour.StrataFrame.Tools.EnumDisplayValue("Pear", False)&amp;gt; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Item3 = 3&lt;BR&gt;End Enum[/codesnippet]&lt;P&gt;Then parse it out this way:&lt;P&gt;[codesnippet]e.Columns(1).DisplayVaue = MicroFour.StrataFrame.Tools.Common.GetEnumDisplayValue(.MyEnumField)[/codesnippet]</description><pubDate>Tue, 21 Aug 2007 11:00:43 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>