WPF datagrid cell editing template selector

Jan 13, 2009 at 1:00 PM

I am trying to use the CellEditingTemplateSelector property on the DataGridTemplateColumn to use a different editing data template dependent on the current row on the grid. However the SelectTemplate method never gets called. If I set this selector as the CellTemplateSelector it does call the SelectTemplate method but passes in null items at the beginning. Is this a known issue? Do I have to do anything else other than simply setting the selector to get the data grid to use it?

Jan 13, 2009 at 4:28 PM

I managed to get this to work. The CellEditingTemplateSelector is only being used if the CellTemplateSelector was set and the CellTemplate (and CellEditingTemplate) was unset. I think this is a bug as logically the CellTemplate should have no effect on the CellEditingTemplateSelector.