private void isDuplicateButton_Click(object sender, EventArgs e) { if (imagesGridView.SelectedCells.Count > 0) { foreach (DataGridViewImageCell selectedCell in imagesGridView.SelectedCells) { var data = _dataGridViewService.GetActiveCellData(selectedCell); if (data != null) { data.IsDuplicate = 1; _controller.SetDuplicateValue(data.Id, true); _dataGridViewService.SetDuplicateDisplay(selectedCell); Messaging.Talk($"{data.ImagePath} marked as Duplicate"); } } } }