
You should not change the underlying ValueTemplate like that. Those types of changes will not be picked up dynamically (e.g. you would have to call PropertyGrid.Refresh). Additionally, you should (almost) never set the VisualTree property the way you are. Unless you specifically know that is has not been sealed (which it would be if the DataTemplate was loaded from a XAML resource).
Also, setting the DataTemplate in this manner will override the all the property editor functionality in the PropertyGrid. Really, your MyPropertyGridDataAccessorItem should not be setting the ValueTemplate at all, it just needs to expose a new DependencyProperty (which you have as EditMode). The ValueTemplate should typically be assigned by the PropertyGrid, as defined by you via the PropertyGrid.PropertyEditors or BuiltinEditors.PropertyEditors collections, or by explicitly setting PropertyGridDataAccessorItem.ValueTemplate property (outside of your custom class that is).
What I'm assuming you want to do is have the Value presented by a TextBlock, then when the user presses the F2 key or double clicks, then it would show a ComboBox allow them to modify it. If so, then your DataTemplate should look something like this:
<DataTemplate>
<Grid>
<TextBlock x:Name="textBlock" ... />
<ComboBox x:Name="comboBox" Visibility="Collapsed" ... />
</Grid>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding EditMode, RelativeSource={RelativeSource AncestorType={x:Type custom:MyPropertyGridDataAccessorItem}}}" Value="true">
<Setter TargetName="textBlock" Property="Visibility" Value="Collapsed" />
<Setter TargetName="comboBox" Property="Visibility" Value="Visible" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
Basically it would show the value using a TextBlock, until EditMode is set to true. At which point, the ComboBox would be shown. Then your MyPropertyGridDataAccessorItem could toggle EditMode when F2 is detected or on a double click.
Note: If you must build the DataTemplate in the code-behind then you would need to translate this obviously.
If you are a customer, then we can provide the DataTemplates for the built-in property editors (just send an email to our support address requesting them). This is helpful because there are several other things that should be hooked up (for example IsLimitedToStandardValues) to keep your DataTemplate generic. Also, this typically helps with building your own DataTemplates.