StrataFrame Forum

Localization of DevEx.ComboBoxEdit display values

http://forum.strataframe.net/Topic13369.aspx

By George Nentidis - 1/11/2008

Hi there,

I am using a ComboBoxEdit from the StrataFrame DevExpress wrapper, and I use Enumaration as the PopulationType of the control. It all works fine, but how can I localize the values that are displayed in the combo drop down list?

Thank you...

By StrataFrame Team - 1/11/2008

In your enumeration, add an attribute of type:

MicroFour.StrataFrame.Tools.EnumDisplayValueAttribute

This allows you to set the text or to set the localization key used to retrieve the text:

Public Enum MyEnum
    <EnumDisplayValue("My Value Display")> _
    MyValue1
    <EnumDisplayValue("MyValueDisplayLocalizationKey", True)> _
    MyValue2
End Enum

The first example is how you just set the text... the second example shows how to set the localization key used to retrieve the text from the localization system.

By StrataFrame Team - 1/11/2008

And if you're C# Wink

public enum MyEnum
{
    [EnumDisplayValue("My Value Display")]
    MyValue1,
    [EnumDisplayValue("MyValueDisplayLocalizationKey", true)]
    MyValue2
}

By George Nentidis - 1/11/2008

Thank you Ben...