Localization of DevEx.ComboBoxEdit display values


Author
Message
George Nentidis
George Nentidis
StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)
Group: Forum Members
Posts: 72, Visits: 251
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...

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
And if you're C# Wink

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

George Nentidis
George Nentidis
StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)
Group: Forum Members
Posts: 72, Visits: 251
Thank you Ben...
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search