简体   繁体   中英

How to fill a Devexpress.LookUpEdit with set values?

I have a Devexpress LookUpEdit that I want to fill with 2-3 values. For example "Value 1" (1) and "Value 2" (2). I want this name to be displayMember of the LookUpEdit and the number in brackets be the valueMember so that if I was given the number 1 I know to set the selected value of the LookUpEdit to "Value 1".

You should make a class with two properties, then bind a set of instances of it to the LookUpEdit.
You can then set the LookUpEdit's DisplayMember and ValueMember properties.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM