Hello,
I have an ultragrid that I am applying a ValueBasedAppearance to. The column that is getting the ValueBasedAppearance applied to it is a boolean column. The conditon for the column is quite simple, if the value of the cell is true, I an image in the column, if not I don't show any image at all. These conditions I am setting seem to be working when I run my application on my development, however once we package up my application into a Install Shield file and deliver it to a user, they never see the image I placed in the boolean under any circumstances.
I looked through the infragistics website and found the page that details the required assemblies for all controls/components and I am following those guidelines provided exactly, so I do not understand what could be going wrong with my application/ultragrid when its is installed on a user's box with Install Shield. Could someone please help me with this issue? Just so you are aware I have tried setting the ValueBasedAppearance in two, the first being through the Designer that is provided by Infragistics, the second way is through coding myself. Below is the code I used to get same result in the Designer.
appearance1.ForegroundAlpha = Alpha.Default;
appearance1.ImageBackgroundStyle = ImageBackgroundStyle.Centered;
appearance1.ImageVAlign = VAlign.Middle;
Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
appearance2.BorderColor = Color.Green;
valAppearance.Add(condition_1, appearance1);
valAppearance.Add(condition_2, appearance2);
this.ugEditorCtl.DisplayLayout.Bands[0].Columns["displayed"].ValueBasedAppearance = valAppearance;
Hello Mike,
Your probably right that it may be a theming issue. I was able to get the ultragrid column to perform as I needed by utilizing a UltraCheckEditor as its Editor control instead. Thanks again for your help with this issue.
Adrian
It sounds like this is a theming issue, then. ForegroundAlpha.Transparent will work on a machine where themes are off or not supported. But it will have no effect on the themed drawing. For that, you need to set ThemedElementAlpha to Transparent, as well.
Hi Mike,
Yes the checkbox does not show up my development box, and is showing up on the client machine when the application is deployed. The way I am accomplishing this is by simply setting the ForegroundAlpha property in the ValueBaseAppearance to Transparent, for both cases when the boolean value is True or False. This prevents the checkbox from showing up on my machine, but not on the client's box. This can also be done by changing the CellAppearance's ForegroundAlpha property to Transparent as well.
I am not sure whether or not the client's machine supports themes or not. How could I go about checking to see if their machine does or does not have theme support?
The version of the controls that I am using v7.3. Is the GlyphInfo property something that is available on the version I am using?
Hi Adrian,
So you are saying that the checkbox is not showing up on your machine, but does show up on the client machines when you deploy your application?
The only reason I can think of for something like that is if one machine support themes and the other doesn't. Even then, I'm not really sure how this would occur.
How are you removing the checkboxes on your machine? I assumed you were modifying the column somehow by setting the Style, but I don't see how that would work on one machine and not another.
What version of the controls are you using? If you have the latest version, then it seems to me that the easiest thing to do would be to use the GlyphInfo to change the checkbox image, rather than a ValueBasedAppearance.
I went ahead and did as you suggested and set the background color for the ValueBasedAppearance and that property seems to be working perfectly. I also noticed that the Image is coming up, however, it is being covered by the CheckBox in the cells of the boolean column. Do you have a suggestion as to how I can make the image come to the front or make the checkbox invisible so the image can clearly been seen?