void GamesDataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { var grid = (DataGridView)sender; var row = grid.Rows[e.RowIndex]; var item = ((x360ce.Engine.Data.UserGame)row.DataBoundItem); var isCurrent = GameDetailsControl.CurrentGame != null && item.GameId == GameDetailsControl.CurrentGame.GameId; AppHelper.ApplyRowStyle(grid, e, item.IsEnabled); //e.CellStyle.ForeColor = string.IsNullOrEmpty(item.FullPath) // ? System.Drawing.Color.Gray // : grid.DefaultCellStyle.ForeColor; //if (e.ColumnIndex == grid.Columns[ProgramIdColumn.Name].Index) //{ // UpdateCellStyle(grid, e, SettingSelection == null ? null : (Guid?)SettingSelection.PadSettingChecksum); //} //else if (e.ColumnIndex == grid.Columns[MyIconColumn.Name].Index) { e.Value = isCurrent ? SaveGamesButton.Image : Properties.Resources.empty_16x16; } else { //var row = grid.Rows[e.RowIndex].Cells[MyIconColumn.Name]; //e.CellStyle.BackColor = isCurrent ? currentColor : grid.DefaultCellStyle.BackColor; } }