Hi...
I am developing an application in .Net 2005 which
has a DataGridView, like Microsoft outlook. I want
to mark read and unread for each mail. I am trying
to put one image for read(open mail image) and
another image for unread(close image).This gridview
is having five columns, two image columns and other
text column. i have to put the image in
cell_painting event. As the cell paint event is
called every time(like mouse move event, mouse down
event etc), the DataGridView is getting hanged(i
can see the window below the DataGridView. the page
or form, which is just below the frame is viewed).
i tried to solve this by adding a
DataGridView.Refresh(). in DataGridView's scroll
event, and mouse down event.
But Now am getting another problem, any
message box or any other form trying to open over
the outlook form is not seen. that is, the message
box is not shown. when i press ALT, the message
box is shown. it can be seen.
I cant figure out the problem. please help
me. All replies and help will be highly
appreciated.
The code is like this
In cell paint event()
{
if(DataGridView.Column
[e.ColumnIndex].HeaderText=="Status")//Status is my
image column in which i will put the read or unread
image
{
e.value=MyApplication.global::prperties.resource.R e
ad;
e.DrawImage
}
}
I tried with Invalidate and refresh. But didnt work for me. Almost 30 mails will come in one second. So the gridview will bvecome hang.
Please help..