private void updateCell(DataGridViewCell cell, bool sync) { TaskRow taskRow = cell.OwningRow.Tag as TaskRow; System.Diagnostics.Debug.WriteLine(String.Format("Bitches {0}", cell.OwningColumn.HeaderText)); if (taskRow.has_key(cell.OwningColumn.HeaderText)) { Hashtable data = taskRow[cell.OwningColumn.HeaderText]; cell.Value = data["value"]; cell.Style = null; if (sync == false) { cell.Style.ForeColor = System.Drawing.Color.Gray; cell.Style.SelectionForeColor = System.Drawing.Color.Gray; } else if (syncCheckboxes.ContainsKey(cell.OwningColumn.Index) && (syncCheckboxes[cell.OwningColumn.Index].Checked == false)) { cell.Style.ForeColor = System.Drawing.Color.Gray; cell.Style.SelectionForeColor = System.Drawing.Color.Gray; } else if ((bool)data["errored"] == true) { cell.Style.ForeColor = System.Drawing.Color.Red; cell.Style.SelectionForeColor = System.Drawing.Color.Red; cell.Style.BackColor = System.Drawing.Color.Bisque; } else if ((bool)data["different"] == true) { cell.Style.ForeColor = System.Drawing.Color.DarkGreen; cell.Style.SelectionForeColor = System.Drawing.Color.DarkGreen; cell.Style.BackColor = System.Drawing.Color.Honeydew; } } }