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 grid_RowsAdded(object sender, DataGridRowsAddedEventArgs e) { txtMsg.Foreground = new SolidColorBrush(Colors.Black); txtMsg.Text = string.Format("Product {0} Added", (e.AddedRows[0].DataItem as Product).ProductNumber); }
private void grid_RowsAdded(object sender, DataGridRowsAddedEventArgs e) { txtMsg.Foreground = new SolidColorBrush(Colors.Black); txtMsg.Text = string.Format("Product {0} Added", (e.AddedRows[0].DataItem as Product).ProductNumber); }