How can i fill the display member and value member in wpf combobox ???
cboTimeFormat.DataContext=
Enumeration.GetAll<TimeFormat, StringValueAttribute>();How can i fill the display member and value member in wpf combobox ???
cboTimeFormat.DataContext=
Enumeration.GetAll<TimeFormat, StringValueAttribute>();Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Kunal VaishyaRank #990 · 2K reputationPosted Apr 17, 2012, 4:05 AM EDT
Please try this code which is i menntion below
ComboBox1.ItemsSource = "{Binding}"
ComboBox1.DisplayMemberPath = "Customer_Type"
ComboBox1.Text = "{Binding Path=Customer_Type"
Kunal VaishyaRank #990 · 2K reputationPosted Apr 17, 2012, 4:09 AM EDT
Kunal VaishyaRank #990 · 2K reputationPosted Apr 17, 2012, 4:37 AM EDT
ComboBox1.SelectedValuePath = "No"
ComboBox1.DisplayMemberPath = "Name"