I have a data grid that uses combo boxes for the user to select an object.
My problem is that the combo boxes are populated with what is currently available ( date / level related) which is fine while filling out the current day but if you look at historic data the combo box does not always contain the items that were selected in the past. Which means they don't display the label all you see is a reference to the object.
I thought the solution to this would be to change the editor style in historic data to a text box ( editing no longer needed) and show just the item that was selected.
However because I am working with objects I can't get them to display properly. Changing the editor style to a texteditor is fine but I need the to display a property of the object in the texteditor not the object.
In the combobox the DisplayMemberPath handles this. But in the textbox i can't get it to display the Object.Name rather than Object
Can anyone suggest a way to handle this issue?
Thanks
Murray
Hi Jason
Thanks for the link
It shows how to display the properties of the object. Which I knew. What I am struggling with is if you take that example and then you wanted in edit mode to display a combo box how do you do that?
It would need to switch back to the text box displaying the complex property after edit
do you know how that can be done?
regards
Hello Murray,
Does the column that shows the historic data only ever display a text box or will it also sometimes need to display a combo box? If you only need to display the text box then one way to go about this would be to use an UnboundField and set up the grid to display a complex property:
<http://help.infragistics.com/NetAdvantage/WPF/Current/CLR4.0/?page=xamDataPresenter_Displaying_a_Complex_Property_XAML.html>
If this doesn't work, or if it doesn't match what you need to accomplish, please provide me with a few more details about the data you want to display. If possible, please include a small project that demonstrates the issue.