DataGridViewImageColumn显示问题 [英] DataGridViewImageColumn Display Issue

查看:452
本文介绍了DataGridViewImageColumn显示问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好...

我正在开发一个应用程序.net 2.0(Windows窗体-MDI应用程序).我需要在带有图像(已读和未读图像)的DataGridView中显示邮件.我使用了DataGridViewImage列,并且尝试将图像放在Cell_Painting事件的该列中.但是,在显示图像后,网格变得很奇怪.我可以看到网格下方的框架(透明).当我移动表格时,它将变得完美.也无法查看窗口上方的ant消息框.

一秒钟内将有近20封邮件来临,而邮件即将来临时,网格正在挂起.请任何人帮助我..

我尝试了Invalidate()和Refresh().但是nothg对我有用....
在网格的单元绘画事件中............

如果(.ColumnIndex = 1)
{
e.value = Image.FromFile(f:\ Read1.bmp;)
}

}
Reply

Hi All...

I am developing an application .net 2.0 (windows Forms - MDI Application.) I need to display mails in a DataGridView with Image (Read and Unread Image). I have used a DataGridViewImage column and i trying to put the image in that column in Cell_Painting event. But after displaying the image the grid is behaving weird. I can see the frame below the grid,(tranparent). When i move the Form, it will become perfect. Also am not able to view ant message box which comes over the window.

Almost 20 mails will come in one second, the grid is getting hanged while the mails are coming. Please anyonehelp me..

I tried with Invalidate() and Refresh(). But nothg works for me....
In cellpainting event of the grid............

If (.ColumnIndex = 1 )
{
e.value=Image.FromFile(f:\Read1.bmp;)
}

}
reply

推荐答案

代码如下:
带有示例的DataGridViewImageColumn的详细信息 [
Code as per given here:
Details of DataGridViewImageColumn with Sample [^]


这篇关于DataGridViewImageColumn显示问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆