I have combo box which displays room numbers. Now i want to show room numbers and room types like this
102 Suite Double
305 Standard Single
and so on. I done this but problem is that i cannot get only room number. Can anyone advice me something?
if you have two columns in the DataSource called: RoomNumberAndName
and RoomNumber
(id) you just need this:
<ComboBox Name="cbData" ItemsSource="{Binding DpData}"
DisplayMemberPath="RoomNumberAndName"
SelectedValuePath="RoomNumber" />
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.