This is happening because you have specified CellTemplate as TextBox which will never bring your grid to editmode.
(This is why you cells are auto editing.)
You can Use TextBlock for CellTemplate and TextBox for CellEditingTemplate. Something similar to below.
This will enable your grid to trigger event(s) required.
DataGridColumn gt;
DataTemplate dt, dtEdit;
StringBuilder CellTemp = new StringBuilder();
CellTemp.Append("<DataTemplate ");
CellTemp.Append("xmlns='http://schemas.microsoft.com/winfx/");
CellTemp.Append("2006/xaml/presentation' ");
CellTemp.Append("xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>");
CellTemp.Append("<TextBlock ");
CellTemp.Append("Text='{Binding myElement, Mode=TwoWay}'></TextBlock> ");
CellTemp.Append("</DataTemplate>");
StringBuilder CellEditTemp = new StringBuilder();
CellEditTemp.Append("<DataTemplate ");
CellEditTemp.Append("xmlns='http://schemas.microsoft.com/winfx/");
CellEditTemp.Append("2006/xaml/presentation' ");
CellEditTemp.Append("xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>");
CellEditTemp.Append("<TextBox ");
CellEditTemp.Append("Text='{Binding myElement, Mode=TwoWay}'></TextBox> ");
CellEditTemp.Append("</DataTemplate>");
gt = new DataGridTemplateColumn();
gt.Header = "Some Text";
dt = (DataTemplate)XamlReader.Load(CellTemp.ToString());
dtEdit = (DataTemplate)XamlReader.Load(CellEditTemp.ToString());
((DataGridTemplateColumn)(gt)).CellTemplate = dt;
((DataGridTemplateColumn)(gt)).CellEditingTemplate = dtEdit;