I'm having trouble changing the image in a DataGridViewImageCell on mouseover. According to a few sources it should be as simple as changing the value of the cell to the desired image. However, nothing seems to happen when I try this. Here is the code:
private void dgvThingProgramsOnPlace_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == dgvThingProgramsOnPlace.ColumnCount - 1)
{
dgvThingProgramsOnPlace.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = Image.FromFile(@"C:\Users\suan\Desktop\temp\icons\raster\gray_dark\x_16x16_red_custom.png");
}
}
Any ideas?
UPDATE: I've checked the debugger and the breakpoint is hit. The image paths are also definitely different. The problem is, the new image value is not getting assigned for some reason. In the debugger the before value == the after value...strange