yes you can, and with a small amount of imagination it was very obvious and very simple. In fact MSDN shows almost how to do it, it shows how you draw something for a given cell and it took me like 2 minutes of my life which I bothered to do.
And you guys wonder why I get narked? Tiny amount of reading of msdn.
where b is a bitmap loaded in or such.
e.PaintContent(e.CellBounds);
if (dataGridView1.CurrentCell.RowIndex == e.RowIndex && dataGridView1.CurrentCell.ColumnIndex == e.ColumnIndex)
{
e.Graphics.DrawImage(b, e.CellBounds);
}
else
{
e.PaintBackground(e.CellBounds, true);
}
e.Handled = true;
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
Um
take a look at the events one kinda stands out.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
I just noticed it pasted it funny.
That drawcontents should be just before the handled line not the first. Otherwise yes the background ovewrites it but you would have noticed that..
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190
when you say its overlapping - what exactly is it overlapping? do you even mean overlapping? Please explain more clearly your issue as at the moment its not clear at all. If necessary, draw a picture or take a screen shot or something and use pointers and point out what you're getting you're not expecting.
the code I gave will only draw the picture for the current cell,and do normal behavor for all others, so I dont understand what the rest of your post is on about..
Please explain more fully and also explain what you've done to try and fix it.
LizR
Posting Virtuoso
1,791 posts since Aug 2008
Reputation Points: 196
Solved Threads: 190