protected override void OnCellEditEnded(CellEditEventArgs e)
 {
     base.OnCellEditEnded(e);
     // ignore expression column changing
     if (!e.Cancel && !ExpressionEditors.Contains(Columns[e.Column].ColumnName))
     {
         ExpressionEditors.Evaluate(GetDataIndex(e.Row));
     }
 }
 private void DataGridEE_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     ((INotifyPropertyChanged)sender).PropertyChanged -= DataGridEE_PropertyChanged;
     // ignore expression column changing
     if (!ExpressionEditors.Contains(e.PropertyName))
     {
         // evaluate the expression
         ExpressionEditors.Evaluate(Items.IndexOf(sender));
     }
 }
 private void C1DataGridEE_RowsAdded(object sender, DataGridRowsAddedEventArgs e)
 {
     Dispatcher.BeginInvoke(new Action(delegate
     {
         var row = e.AddedRows[0];
         // evaluate the expression
         var idx = ((ListCollectionView)ItemsSource).IndexOf(row.DataItem);
         if (idx >= 0 && Rows.Count > idx)
         {
             ExpressionEditors.Evaluate(row.Index);
         }
     }));
 }
 private void C1DataGridEE_CommittedEdit(object sender, DataGridCellEventArgs e)
 {
     Dispatcher.BeginInvoke(new Action(delegate
     {
         var row = e.Cell.Row;
         // this is not a new row. New row is not present in ItemsSource with which ExpressionEditor works
         // ignore expression column changing
         if (!ExpressionEditors.Contains(e.Cell.Column.Name))
         {
             // evaluate the expression
             var idx = ((ListCollectionView)ItemsSource).IndexOf(row.DataItem);
             if (idx >= 0 && Rows.Count > idx)
             {
                 ExpressionEditors.Evaluate(idx);
             }
         }
     }));
 }