开发者

Dropdown Tied to ENUM now needs multilingual text

开发者 https://www.devze.com 2023-03-28 12:21 出处:网络
Dropdown control is initialized like this: lookUpEdit.Properties.DataSource = Enum.GetValues(typeof(PriceLevel));

Dropdown control is initialized like this:

lookUpEdit.Properties.DataSource = Enum.GetValues(typeof(PriceLevel));

And at lot of places its value is accessed like:

(PriceLevel)priceLookUpEdit.EditValue;

Now we are implementing multilingua开发者_如何学Cl functionality. Is there a way to change the text of dropdown values without breaking the link with the enum?


The Dropdown in ASP.NET uses items which contain a text and a value. Winforms should have a similar approach.

See http://msdn.microsoft.com/en-us/library/system.windows.forms.listcontrol.selectedvalue.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消