473,387 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Image display problem in DatagridViewImageColumn

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..
Mar 5 '10 #1
4 3709
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..


In cellpainting event of the grid............

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

}
Mar 9 '10 #2
pls reply me as soon as possible...
Mar 9 '10 #3
tlhintoq
3,525 Expert 2GB
Please don't double-post your questions. It divides attempts to help you in an organized and cohesive manner. Your threads have been merged
Mar 9 '10 #4
Sorry. I think i have posted the secondtime unknowingly.. please excuse me...
Please reply me, as am stuck with this issue.
Mar 10 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Rajesh | last post by:
Hi all, Im gonna display a list of images in an aspx page from sql server Db.Each image has a link.When someone clicks the image i want the width and size of the image to be displayed at the...
0
by: None | last post by:
Hi, I'm using DataGridView in my Windows Forms project. I need to know how we can insert an image into the specified cell . I tried with the following code.
2
by: Marc Solé | last post by:
Hello, I want to insert an image to a specific column of a dataGridWiew. I explain what I'm doing: - I define the ColumnType as a DataGridViewImageColumn. - I select the image (an icon of...
3
by: den 2005 | last post by:
Hi everyone, Here is code working on..Trying to insert record with a column with Image or VarBinary datatype in sql database from a existing jpeg image file, then retrieve this image from...
2
by: henpat | last post by:
Hello all I have a DGV and I need that an icon (image) apears depending the Status field. The status field is 0, 1 or 2 and I need to put three different little pictures on it. Thanks for your...
3
by: =?Utf-8?B?SlIx?= | last post by:
I would like to add text to an image. I have tried to use DrawString and it works on some images but on others it is very very small. I am pretty sure it has something to do with the size of the...
0
by: bindslind | last post by:
The script does most of what it's supposed to do, but I have what seems to be a simple problem that I can't figure out. When the page intitially loads the first page does not display images. The same...
11
by: Chris Beall | last post by:
See http://pages.prodigy.net/chris_beall/Demo/photo%20block%20experiments.html I've ended up with what seems like a rather complex structure for what I thought would be a somewhat simple...
3
by: Froefel | last post by:
Hi group, I'm looking for some help on how to achieve the following in a gridview control that is based on an ObjectDataSource. The SelectMethod of the datasource returns a list of Customer...
0
by: Bakulla | last post by:
Hi. I have not bounded DataGridView with some DataGridViewImageColumn-s in my project. Cells in this columns contains different images (see attached picture). I want to somehow get image value of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.