one question on ComboBox databinding

In my scene, I bind the ComboBox to the CountryId field in a table. This field stores "1", "2" and so on. But in the ComboBox, I hope it can display "Japan", "American". The mapping is defined in a .xml file.

So, what should i do?

Thanks

[297 byte] By [LeoXue] at [2007-12-24]
# 1

Use the ComboBox's DisplayMemberPath property to specify which property on the data object should be shown in the UI. ms-help://MS.MSSDK.1033/MS.NETFX30SDK.1033/cpref30/html/P_System_Windows_Controls_ItemsControl_DisplayMemberPath.htm

JoshSmith at 2007-10-8 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified