I would like to apply CellTemplateSelector to a CellEditingTemplate. Can they be combined?
This is them separate
<DataGridTemplateColumn x:Name="dateScheduledColumn" Header="Date Scheduled" Width="125">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path= DateScheduled, StringFormat=\{0:d\}}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<DatePicker SelectedDate="{Binding Path=DateScheduled, Mode=TwoWay,
ValidatesOnExceptions=true, NotifyOnValidationError=true}" />
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Grade">
<DataGridTemplateColumn.CellTemplateSelector>
<local:GradeTemplateSelector
PassedTemplate="{StaticResource PassedTemplate}"
FailedTemplate="{StaticResource FailedTemplate}"/>
</DataGridTemplateColumn.CellTemplateSelector>
</DataGridTemplateColumn>
If I try this I get a syntax error
<DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplateSelector>
Just use DataGridTemplateColumn.CellEditingTemplateSelector