Hi.
I have not bounded DataGridView with some DataGridViewIma geColumn-s in my project. Cells in this columns contains different images (see attached picture). I want to somehow get image value of clicked cell and do some action according on which image the cell contains.
I tried something like this:
but this do not work :/.
Im new to C# so sorry for stupid question. Hope, it is understandable.
Thanks for answers. :)
I have not bounded DataGridView with some DataGridViewIma geColumn-s in my project. Cells in this columns contains different images (see attached picture). I want to somehow get image value of clicked cell and do some action according on which image the cell contains.
I tried something like this:
Code:
private void myGrid_CellContentClick
(object sender, DataGridViewCellEventArgs e)
{
if (myGrid.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.Equals
(global::nameSpace.Properties.Resources.greenFill))
{
//do something
MessageBox.Show("Image is green");
}
}
Im new to C# so sorry for stupid question. Hope, it is understandable.
Thanks for answers. :)