private void ultraGridPop_AfterCellUpdate(object sender, CellEventArgs e) { System.Diagnostics.Debug.Write(e.Cell.Row.Index.ToString() + "\n"); //Change Saved State IftProperties.IsSaved = false; UltraGrid ugrid = this.ultraGridPop; int EpiSort = Convert.ToInt32(ugrid.ActiveCell.Row.Cells["EpiSort"].Value); String Country = Convert.ToString(ugrid.ActiveCell.Row.Cells["Country"].Value); int Year = Convert.ToInt32(ugrid.ActiveCell.Column.Header.Caption); String Pop = Convert.ToString(ugrid.ActiveCell.Row.Cells["Pop"].Value); decimal? Value = null; if (e.Cell.Value != DBNull.Value) { Value = Convert.ToDecimal(e.Cell.Value); } DatabaseImplementation.UpdatePopIn(IftProperties.IFTNo, IftProperties.Version, EpiSort, Country, Year, Pop, Value); //Call stored Procedure that recalculates values //New Datatable with new values updated from the database transaction DataTable dtUpdated = new DataTable(); dtUpdated = DatabaseImplementation.LoadPopInGrid(IftProperties.IFTNo, IftProperties.Version, "PopIn_Pivot"); //Merge changes popDataTable.Merge(dtUpdated, false, MissingSchemaAction.AddWithKey); // Refresh grid, this does not redraw grid ugrid.Rows.Refresh(RefreshRow.ReloadData); }