We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Image List Display in Grid Cell

I am attempting to use an ImageList to display either a check mark or a blank image based on the data value of that column being 1 or 0. So far, with the gridGroupingControl, this is working out great, except that there are these weird blue dots in the cells. Can someone please tell me what these are? They are making the images look weird. When I set this image to the background property of the cell, it looks perfect, so I know it is not the image. Perhaps there is a property of the ImageList or the cell style I am over looking? Your help would be greatly appreciated. Below is a small sample of my code. Thanks for your help!

ImageList images = new ImageList();
images.Images.Add(HillRom.Utility.UI.ImageManager.GetEmbeddedBitmap("no_check.png"));
images.Images.Add(HillRom.Utility.UI.ImageManager.GetEmbeddedBitmap("green_check.png"));

Syncfusion.Windows.Forms.Grid.GridStyleInfo style = gridGroupingControl.TableDescriptor.Columns["Priority"].Appearance.AnyRecordFieldCell;
style.CellType = "Image";
style.ImageList = images;
style.ImageSizeMode = Syncfusion.Windows.Forms.Grid.GridImageSizeMode.Normal;



example.zip

1 Reply

LA Landon February 15, 2008 03:43 PM UTC

Nevermind, the problem was with the image itself and / or the color depth of the image list. I re-created the PNG images with zero compress, and set the imageList color depth to 32 bit and this corrected the problem. Maybe this will help someone else. Thanks.

>I am attempting to use an ImageList to display either a check mark or a blank image based on the data value of that column being 1 or 0. So far, with the gridGroupingControl, this is working out great, except that there are these weird blue dots in the cells. Can someone please tell me what these are? They are making the images look weird. When I set this image to the background property of the cell, it looks perfect, so I know it is not the image. Perhaps there is a property of the ImageList or the cell style I am over looking? Your help would be greatly appreciated. Below is a small sample of my code. Thanks for your help!

ImageList images = new ImageList();
images.Images.Add(HillRom.Utility.UI.ImageManager.GetEmbeddedBitmap("no_check.png"));
images.Images.Add(HillRom.Utility.UI.ImageManager.GetEmbeddedBitmap("green_check.png"));

Syncfusion.Windows.Forms.Grid.GridStyleInfo style = gridGroupingControl.TableDescriptor.Columns["Priority"].Appearance.AnyRecordFieldCell;
style.CellType = "Image";
style.ImageList = images;
style.ImageSizeMode = Syncfusion.Windows.Forms.Grid.GridImageSizeMode.Normal;



example.zip


Loader.
Live Chat Icon For mobile
Up arrow icon