April 7th, 2009, 02:35 PM
How to get the text value of a bound data item in code??
I have a ComboBox that has it's ItemsSource databound - I'm using the DisplayMemberPath to set the actual text that displays in the control.
I have a function where I need to iterate through the Items collection of the ComboBox and check the text value for each of the items ... the problem is, of course, that the ToString() for each of the combo box items is actually just a class name. Is there a good way to extract the text value for the ComboBoxItems by using the DisplayMemberPath somehow in code?
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.