I have an UltraWinGrid which contains a column with UltraDropDowns. I've tested in my development environment and had no problems with it (Windows XP and Windows Vista).
But when I deployed the application in the client Pc, I saw an issue when displaying the ultradropdown.
It's hard to describe, but i can't see the items that contains the ultradropdown, instead all i can see is a blue background as the dropdown with no items.
The image describes it better.
I tested the same application as an administrator in the same computer, and the issue doesn't apper, it displays it perfectly.
version of the UltraWinGrid 9.1
Hi,
Hm, that's a weird one. I've never seen anything like that.
Is your application accessing the system registry? Perhaps you are loading the data for the dropdown based on some registry key and the application is unable to access it because it needs admin rights?
Or perhaps the application is using the registry to find the location of a file, like an isl (Application Style Library) file and it cannot get to that file and so it's changing the appearance of the dropdown.
What happens if you click on that blue area on the dropdown?
Have you tried creating a small sample project with just a simple grid and a dropdown and nothing else to see if that works? If it does, then there's something else going on in your application. If it does not, then that would narrow the problem down considerably.
Mike, my application is not accessing the system registry.
The datasource (which its a table of a DB) of the dropdown is loaded correctly, even when it displays this blue background, because if i navigate through it with the arrow keys, i can see all the data that contains the ultradropdown. (it has only 5 items).
When i click on the blue area nothing happens.
I've tried creating a sample project to test this, and the problem persists.
Mike, I tested the sample application in an environment with administrator rights and the problem persists.
So I guess it's not about admin rights.
Mike, i tried scrolling the bar up and down, and I'll post a picture of what happens (remember i am running the application with admin rights).
If i execute the .exe setting "run as" using my account, it displays perfectly, as you can see here.
I ran your sample with the last Service release for v9.1 and it worked just fine for me.
So maybe you just need to get the latest service release.
How to get the latest service release - Infragistics Community
From the screen shot, it kinda looks like the rows in the dropdown are just really big height-wise. It might be interesting to put a button on the form and put some code in it like this:
Debug.WriteLine(_srep.Rows[0].Height);
I'd be interested to know what the height of the row is.
Also... I don't think this is part of the problem, but I noticed something a little odd in your code:
e.Layout.Bands[0].Columns["srep_name"].PerformAutoResize(PerformAutoSizeType.AllRowsInBand, true);e.Layout.Bands[0].Columns["srep_name"].Width = 180;
This code doesn't make any sense. Why are you autosizing the column and then setting the width to a hard-coded value, anyway?
Another thing to take a look at is the font you are using. If this is not related to Admin rights, as you seem to be saying, then perhaps the reason it happens on some machines and not others is because some machines don't have Verdana installed. I don't think this is a font that installs with every version of Windows, although I could be wrong.
What you could do is check the _font.Name right after you create the new font and see if the Name comes back Verdana. If not, it means that font is not installed and I think DotNet falls back to the ambient font, which is probably MS Sans Serif. Not that that should be causing a problem like you are having, but I'm just throwing out ideas here, since I don't know what's causing this for sure.
Mike, thanks for your input, It helped us solve the problem.
We didn't get the latest service release yet, but we intend to.
You were right about the row height, it was really big when it displayed the blue background. I added a button to display that height and it was 1481 (pretty big huh...)
We've checked the property Name of the Font and it always displayed "Verdana", so it wasn't a problem of an unexistant font.
The code you underlined as odd, it was odd indeed, so i corrected it, but it wasn't the problem either.
So, what was the problem? well, it was all about the font, but insted of the name the problem was the size. I make a float.Parse("8.25") when creating the font.
Checking through the Application.CurrentCulture.NumberFormat.NumberDecimalSeparator I've seen a difference between the environment where everything worked ok and the environment where it didn't. I created a button to display these values, and in my environment it was "." and in the problematic one it was ",".
I fixed it, simply casting 8.25 to float --> (float(8.25)) when creating the new font and assigning it to the UltraDropDown. Then, problem solved.
If you want to reproduce the problem, maybe you could try changing the Decimal Separator (in the OS settings) to a comma, and it should display the blue background.
Thanks!
AHA! That makes sense. I was wondering why you were using a string for the font size, anyway, but I didn't think about the decimal separator and localization.
You are much better off avoiding a string there and using a numeric value, anyway. Glad you got it all sorted out.