Beata

Beata

  • NA
  • 1
  • 2.9k

DataGridView - disable cell in DataGridViewImageColumn

Aug 6 2014 11:12 AM
I have a windows forms app with a DataGridView.  One of the columns is a DataGridViewImageColumn with a 'Edit' image that when clicked allows the user to edit the data that's in this row.  At runtime, I want to find a particular row and then disable the clickable image that is in this particular row/column combination, i.e. just this one cell.  I tried the grid[column,row].ReadOnly property set to true but that did nothing.  The user was still able to click the Edit image.  Ideally, I would like to disable that Edit image so that it's not clickable in this particular cell.  If that's hard to do, removing that Edit image completely from this particular cell at runtime would also be acceptable.
 
 thanks,

Answers (1)