<p>I have an editable DataGridView with SelectionMode set to FullRowSelect (so the whole row is highlighted when the user clicks on any cell). However I would like the cell that currently has focus to be highlighted with a different back color (so the user can clearly see what cell they are about to edit). How can I do this (I do not want to change the SelectionMode)?</p>

[{'answer_id': 73636, 'author': 'Clinton Pierce', 'author_id': 8173, 'author_profile': 'https://Stackoverflow.com/users/8173', 'pm_score': 0, 'selected': False, 'text': '<p>You want to use the DataGridView RowPostPaint method.  Let the framework draw the row, and afterwards go back and color in the cell you\'re interested in.</p>\n\n<p>An example is here at <a href="http://msdn.microsoft.com/en-us/library/85kxk29c.aspx" rel="nofollow noreferrer">MSDN</a></p>\n'}, {'answer_id': 74256, 'author': 'Phillip Wells', 'author_id': 3012, 'author_profile': 'https://Stackoverflow.com/users/3012', 'pm_score': 4, 'selected': True, 'text': '<p>I figured out a better way of doing this, using the CellFormatting event:</p>\n\n<pre><code>Private Sub uxContacts_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles uxContacts.CellFormatting\n    If uxContacts.CurrentCell IsNot Nothing Then\n        If e.RowIndex = uxContacts.CurrentCell.RowIndex And e.ColumnIndex = uxContacts.CurrentCell.ColumnIndex Then\n            e.CellStyle.SelectionBackColor = Color.SteelBlue\n        Else\n            e.CellStyle.SelectionBackColor = uxContacts.DefaultCellStyle.SelectionBackColor\n        End If\n    End If\nEnd Sub\n</code></pre>\n'}, {'answer_id': 11961408, 'author': 'Henry Rodriguez', 'author_id': 8892051, 'author_profile': 'https://Stackoverflow.com/users/8892051', 'pm_score': 0, 'selected': False, 'text': '<p>Try this, the OnMouseMove method:</p>\n\n<pre><code>Private Sub DataGridView1_CellMouseMove(sender As Object, e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.CellMouseMove\n    If e.RowIndex &gt;= 0 Then\n        DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Style.SelectionBackColor = Color.Red\n    End If\nEnd Sub\n\nPrivate Sub DataGridView1_CellMouseLeave(sender As Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellMouseLeave\n    If e.RowIndex &gt;= 0 Then\n        DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Style.SelectionBackColor = DataGridView1.DefaultCellStyle.SelectionBackColor\n    End If\nEnd Sub\n</code></pre>\n'}, {'answer_id': 32944008, 'author': 'Dennis Henry', 'author_id': 2790151, 'author_profile': 'https://Stackoverflow.com/users/2790151', 'pm_score': 1, 'selected': False, 'text': '<p>For me <code>CellFormatting</code> does the Trick. I have a set of columns that one can Edit (that I made to appear in a different color) and this is the code I used:</p>\n\n<pre><code>Private Sub Util_CellFormatting(ByVal Sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles dgvUtil.CellFormatting\n    If dgvUtil.CurrentCell IsNot Nothing Then\n        If e.RowIndex = dgvUtil.CurrentCell.RowIndex And e.ColumnIndex = dgvUtil.CurrentCell.ColumnIndex And (dgvUtil.CurrentCell.ColumnIndex = 10 Or dgvUtil.CurrentCell.ColumnIndex = 11 Or dgvUtil.CurrentCell.ColumnIndex = 13) Then\n            e.CellStyle.SelectionBackColor = Color.SteelBlue\n        Else\n            e.CellStyle.SelectionBackColor = dgvUtil.DefaultCellStyle.SelectionBackColor\n        End If\n    End If\nEnd Sub\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/73471', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3012/']