BeginningEdit 在行或单元格进入编辑模式之前发生
CellEditEnding 在单元格编辑器执行或取消之前发生
<DataGrid Name="AlarmDataDG" BeginningEdit="AlarmDataDG_BeginningEdit" CellEditEnding="AlarmDataDG_CellEditEnding"/>
private void AlarmDataDG_BeginningEdit(object sender, DataGridBeginningEditEventArgs e) { TextBlock tbl = e.Column.GetCellContent(e.Row)