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
Hello Murray,
I just wanted to check in and see if you have had a chance to come back to this issue and if you needed any further assistance with this matter.
Hi Jason
I was still unable to get the behaviour of the grid working correctly.
Unfortunately I am off on another project for the next month and don't have time to keep working on this.
When I get back to it I will probally be in touch
thanks for the follow up
Regards
Do you have any further questions or concerns about switching the editors for a cell in the XamDataGrid based off of other data in the record?
If I'm understanding this issue correctly, this comes from the fact that XamDataGrid determines the editor to show based off of the EditorType or the EditorStyle, with the EditorStyle overriding the EditorType. If you look at my sample I account for this by setting the EditorStyle to null whenever I change the EditorType to a XamTextEditor. You should also be able to replace the XamComboEditor style with a XamTextEditor style if you need to.
This is still giving me problems.
It may have solved one of the issues, as it it does seem to switch better now. However only if you don't have an editor style set on the field. And if you do that then there is no combo box available in the add new record row.
I will play around more and see if i can get it to work. Once I have done more testing I will post back
thanks