S
Steve
Hi All
I am using VB.net 2005 professional
I set the background color of a datagridview cell to different colors
depending on many reasons
I set them in the cellformatting event and all works great, i.e the colors
appear as requested
e.g e.CellStyle.BackColor = Color.Red
When I try to read the color in Datagridview.mouseclick event using...
If
dgvgroup.Rows(hit.RowIndex).Cells(hit.ColumnIndex).InheritedStyle.BackColor
= mycolor Then
it always returns false
end if
Note: mycolor = color.salmonpink and actual grid cell color =
color.salmonpink
but
dgvgroup.Rows(hit.RowIndex).Cells(hit.ColumnIndex).InheritedStyle.BackColor
returns color.honeydew which is the defaultcellstyle.backcolor set in
datagridview properties defaultcellstyle in design environment
what am I doing wrong
Regards
Steve
I am using VB.net 2005 professional
I set the background color of a datagridview cell to different colors
depending on many reasons
I set them in the cellformatting event and all works great, i.e the colors
appear as requested
e.g e.CellStyle.BackColor = Color.Red
When I try to read the color in Datagridview.mouseclick event using...
If
dgvgroup.Rows(hit.RowIndex).Cells(hit.ColumnIndex).InheritedStyle.BackColor
= mycolor Then
it always returns false
end if
Note: mycolor = color.salmonpink and actual grid cell color =
color.salmonpink
but
dgvgroup.Rows(hit.RowIndex).Cells(hit.ColumnIndex).InheritedStyle.BackColor
returns color.honeydew which is the defaultcellstyle.backcolor set in
datagridview properties defaultcellstyle in design environment
what am I doing wrong
Regards
Steve