c# - Winforms: Change Datagridview image on mouseover -


I have trouble changing the image in a DataGridViewImageCell mouseover. According to some sources, the value of this cell is the desired image It should be as easy as changing in However, it seems like I try it. Here is the code:

  Private zero dgvThingProgramsOnPlace_CellMouseEnter (Object Sender, DataGridViewCellEventArgs E) {if (e.ColumnIndex == dgvThingProgramsOnPlace.ColumnCount- 1) {dgvThingProgramsOnPlace.Rows [e.RowIndex]. [E.ColumnIndex] .Value = Image.FromFile (@ "C: \ user \ listen \ desktop \ temp \ icons \ raster \ gray_dark \ x_16x16_red_custom.png"); }}  

Any ideas?

UPDATE: I have checked the debugger and the breakpoint hit is the image path is definitely different. The problem is that, for some reason the new image value is not being assigned. Before value in the debugger == after price ... weird

Wow is finally working It turns out that I accidentally turned on virtualmode for that datagreen view.


Comments