Dustin Taylor (08/19/2008)
Good solutions!
For future reference, there is also a built-in function in StrataFrame to do this very thing. MicroFour.StrataFrame.Tools.Common.GetEnumDisplayValue(yourEnum).
Hi Dustin,
In this very same topic, today I just hit an Enum Display problem in a Dialog Browser in which the enum is not properly displayed when selected in field for the browser result set as in this picture:
I guess the SF combobox is using the MicroFour.StrataFrame.Tools.Common.GetEnumDisplayValue(EnumValue) but the field in the browser result is not. I fixed my code by changing my DB class and populate the CustomerType field throug the RowPopulating event which works nice, but I wonder if the framework should use the GetEnumDisplayValue() every where an enum is used.
Here is my BD code:
Public
Class CustomerBrowserDialog Private Sub CustomerBrowserDialog_RowPopulating(ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.RowPopulatingEventArgs) Handles MyBase.RowPopulating '-- Strong type the passed business object With CType(e.BusinessObject, atr_crm.Business.bizCustomers) '-- Format the customer type enum to display properly. e.Values(4).DisplayValue = MicroFour.StrataFrame.Tools.Common.GetEnumDisplayValue(.CustomerType)
End With End SubEnd
Class
BTW, thanks to Greg and Leonard, this post came up just on time with my situation, even though I used Dustin approach .