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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kunal VaishyaPosted Apr 17, 2012, 8:37 AM
ComboBox1.SelectedValuePath = "No"
ComboBox1.DisplayMemberPath = "Name"
Kunal VaishyaPosted Apr 17, 2012, 8:09 AM
Kunal VaishyaPosted Apr 17, 2012, 8:05 AM
Please try this code which is i menntion below
ComboBox1.ItemsSource = "{Binding}"
ComboBox1.DisplayMemberPath = "Customer_Type"
ComboBox1.Text = "{Binding Path=Customer_Type"