Hi,
In the TemplateColumnContentProvider class you recently modified the EditorRemoved method and added the following lines:
if (this._editor != null)
this._editor.DataContext = null;
This fails in the following scenario:
We have a TemplateColumn with a EditorTemplate which contains a ComboBox. The ComboBox' ItemsSource is set using binding to the DataContext (as is the SelectedItem, which is two-way bound). When your code removes the DataContext in the EditorRemoved method, the ItemsSource is set to null (because it was bound to the DataContext) and as a result, the SelectedItem is set to null by the ComboBox (which is logical, because the ItemsSource is null). This all results in the problem that you can select what you want in edit mode, if you exit the cell, the resulting selection will always be null.
We are lucky that we bought your source code, so we could remove the lines. Now it works again... I guess the reason you added this lines is because the DataContext possibly is held too long, but this clearly is not the solution.
Arjen
Sorry for resurrecting this old thread but we just recently stumbled upon this problem as well when we upgraded to version 2011.1. Changing to an UnboundColumn fixes the problem. After looking at the source it appars that TemplateColumn is the only one reseting the data context as arjen wrote
Has there been any update on this issue?
I would prefer to avoid using the new ComboBoxColumn or creating an entierly new column type since it worked just fine in version 2010.1.
Another possible solution would be to make your own column type for your ComboBox column.
This would mean you wouldn't have to change the source code for the template column
http://blogs.infragistics.com/blogs/devin_rader/archive/2010/07/08/creating-custom-columns-for-xamgrid.aspx
I will have our Developer Support make this into a case so that we can determine what the best course of action is.
Thank you for notifying us of your issue.