Reputation: 349
When I trying to set new image in datagridview imagecell I get two images overlapped and not just second image.
private void dataGridView4_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (e.ColumnIndex == 13)
{
if ((int) e.Value == 1)
e.Value = Resources.ResourceManager.GetObject("unLock");
else
e.Value = Resources.ResourceManager.GetObject("Lock1");
}
}
When I set value to 1 I see first image. When I set to 0 I see two images in one cell overlapped.
Upvotes: 0
Views: 121
Reputation: 349
I used images with transparent background. When I change background to non-transparent color problem was solved.
Upvotes: 1