473,412 Members | 2,050 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,412 software developers and data experts.

DataGridView - Transparent images not displaying correctly

2
I am attempting to populate a DataGridView cell with an image. The image is a 32bit png with Alpha Transparency.

I can get this image to display properly in a picturebox or a Listview but in the DataGridView the image loses quality.

I have tried setting various parts of the control to transparent but nothing seems to work. I import the image into resource file and then call it directly.

See the attachment for an example. The top image is that from a picturebox and the bottom two are in the DataGridView.

I have a feeling I need to override the onpaint event to resolve the transparency/depth issue but I'm not entirely sure.

I would appreciate any help!
Attached Images
 
Jun 15 '09 #1
3 4317
tlhintoq
3,525 Expert 2GB
I couldn't dig anything up on the actual color depth limit for a DataGridView cell. What happens if you put a picturebox in the cell, then put the image in the picturebox? Instead of putting the image in the cell directly
Jun 15 '09 #2
NSH1
2
I'll try that, thanks!

Do you know if requires a custom DataGridView control or can I stick the pictureBox object directly in the cell?
Jun 15 '09 #3
tlhintoq
3,525 Expert 2GB
I've never worked with DGV's so I don't know. Sorry.
It just seemed to make sense that if 'a' works, and 'b' doesn't... find a way to put 'a' inside 'b'
Jun 15 '09 #4

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

Similar topics

0
by: Mark 'Kamikaze' Hughes | last post by:
In the new Python game I'm developing, I need to crop out individual tiles from larger tilesets, and maintain transparency. Unfortunately, I've run into major deficiencies in both Tkinter and PIL...
2
by: Trond Michelsen | last post by:
Hi. I have a transparent PNG-image that I would like to display on top of the rest of the web page. I've already got this part working. But, I'd like the background (as in "the part of the image...
4
by: Dale | last post by:
I am creating GIF images with transparent backgrounds on-the-fly for a web app and rendering them by using System.Drawing.Image.Save(Response.OutputStream, ImageType.GIF). I am confident that...
3
by: connected | last post by:
I'm having difficulty with populating a DataGridView control with data correctly. It works with a single class, for example... class MyClass { private string _propertyOne; private string...
2
by: s14m27 | last post by:
Hi... I have tried displaying images in datagridview control from sqlserver 2000 where i have the path to the images.I could do it column-wise using the DataGridViewImageColumn.Could someone help...
1
by: jcasti1226 | last post by:
Hi guys, This may be a dumb but it has given me a lot of problems. Here is my situation:
0
by: =?Utf-8?B?R3JlZyBQZXRlcnM=?= | last post by:
I use png images with transparent backgrounds for the following ASP.NET server controls: Image, ImageButton, ImageMap, Panel (BackImageUrl for Panel). The images display correctly in IE7, but not...
11
by: Marge | last post by:
After importing a VB6 project into Express 2008 I have two gif's with transparency do not display correctly. In VB6 these pictures where used with the image object which had different properties...
3
by: Stewart Berman | last post by:
I have an application that populates a DataGridView control with an XML file: private void Form1_Load(object sender, EventArgs e) { dataGridView1.DataSource = gridDataSet;...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.