We have successfully got our UltraComboEditor control to display images on our grid (a blank, a green blob and a red blob) that matches with data in an UltraDataSource. The column filter is just a straight equals (so is hidden) and we have the dropdown showing the same 3 images. However, once the filter is applied (and that works too), the image is chopped off so we get just the smallest edge - maybe a couple of pixels of the image, then some white space which looks like we could type into it and that's it.
How can we get the whole image to show ? Is there some kind of text entry that's being displayed that we can disable ?
thanks
Andy
Hi Andy,
I assume this is something of a follow-up from your previous case. But I'm a little fuzzy on exactly what the issue is.
Are you talking about the filter cell? Or the grid cells?
Can you post a small sample project so I can see what you are doing and what the problem is?
Hi Mike,
Yes, it's all related. So I've attached an image for you. There are 4 screen shots from our application - excuse the brevity of it but I've needed to hide much of the screen for commercial sensitivity.
So I *think* all that is required is suppress some kind of editor that's appearing on the dropdown.
This the code that specifically sets up this column (XXX replaces the actual name). There may of course be some things in here that aren't required ! FYI we've had to largely avoid using the Wizards & Editors as it makes trying to track changes in source control quite difficult so we pretty much set up much of the grid in code (which works pretty well).
Private Sub ManageGridColumn_xxx(ByVal band As UltraGridBand) With band.Columns(_column_xxx) .EditorComponent = Me.ultraComboEditorXXX .Width = _column_ComboBoxColumnWidth .MaxWidth = .Width .MinWidth = .Width .LockedWidth = True .AllowRowFiltering = Infragistics.Win.DefaultableBoolean.True .FilterClearButtonVisible = Infragistics.Win.DefaultableBoolean.True .FilterComparisonStyle = FilterComparisonStyle.ValueOnly .FilterOperatorLocation = FilterOperatorLocation.Hidden .FilterOperatorDefaultValue = FilterOperatorDefaultValue.Equals .FilterOperandStyle = FilterOperandStyle.UseColumnEditor End With Me.ultraComboEditorXXX.ValueList.DisplayStyle = Infragistics.Win.ValueListDisplayStyle.Picture ManageGridColumn_UpdateHeader(band.Columns(_column_XXX), My.Resources.redHand_16x16) End Sub
Private Sub ManageGridColumn_UpdateHeader(ByVal column As UltraGridColumn, ByVal headerImage As System.Drawing.Bitmap) Dim _headerIcon As Infragistics.Win.Appearance = New Infragistics.Win.Appearance With _headerIcon .Image = headerImage .ImageHAlign = Infragistics.Win.HAlign.Center End With With column .Header.Appearance = _headerIcon .Header.ToolTipText = .Header.Caption .Header.Caption = String.Empty End With End Sub
As a separate note I've found (and to be fair as this is a validated system we have to use a specific validated version of the infragistics controls (2089) so it's quite "old") that if you go into the glyph editor on the UltraCheckBoxEditor control and load up your icons with transparency that if you go back into that control after saving the newly uploads images then the transparency on the images is lost and you get white boxes etc., around the icons in the grid. Don't know if this is a known bug or not?
thanks again,
You are correct up to a point - the grid does use an editor to provide the dropdown list there. But I don't know any reason why it would be showing a blank space or empty text there. It certainly should not be doing that.
I'm afraid I can't begin to guess what that is exactly or how to suppress it without seeing it in action. Can you provide a small sample project that demonstrates this behavior so we can look into it?
I went back and looked at your previous case and the sample I posted for you there and in that case you explicitly said you wanted the filter cell to show the text. So my original sample shows the text in the cell. I actually had to jump through some hoops to get it to work that way.
In these screen shots, though, it seems like you no longer want the text to display. Is that right?
I went back to my previous sample and I was able to achieve that with a couple of small changes. First, I set:
_band.Columns("Int32 1").FilterOperandStyle = FilterOperandStyle.DropDownList
This prevent the user from typing into the filter cell and makes it so they can only choose an item from the list. This eliminates the caret in the filter cell which might be part of what you are seeing.
Second, in UltraGrid1_BeforeRowFilterDropDownPopulate, I set:
e.ValueList.DisplayStyle = ValueListDisplayStyle.Picture
This eliminates the text from displaying in the filter cell.
Thanks for all your assistance. I've finally got it working but not via the method above (well not quite !). Switching to using the FilterOperandStyle to DropDownList (or anything else) rather than UseColumnEditor means that we don't see the icons in the filter and we only see blanks / not blanks.
However, going on from your suggestion that it's the caret in the filter cell (or part of text that would be displaying that "shouldn't" display) I figured, well if I don't want to see it, what's the least way can do that.
.FilterCellAppearance.FontData.SizeInPoints = 0.1
And the problem has magically gone away !
It now behaves and functions as we need.
Thanks again,
Andy Macnaughton-Jon said:witching to using the FilterOperandStyle to DropDownList (or anything else) rather than UseColumnEditor means that we don't see the icons in the filter and we only see blanks / not blanks.
Hm, that's odd. Maybe that's because in my original sample, I was manually populating the dropdown list in the BeforeRowFilterDropDown event and you are no longer doing that.
Andy Macnaughton-Jon said: However, going on from your suggestion that it's the caret in the filter cell (or part of text that would be displaying that "shouldn't" display) I figured, well if I don't want to see it, what's the least way can do that. .FilterCellAppearance.FontData.SizeInPoints = 0.1
Okay. You shouldn't have to do that, but if it's working for you and you are happy with it, I guess that's fine. :)
We are only on Infragisticis4 v13.1 due to our current technical requirements, so maybe there's something changed to the version that's current.
All looks good so far. Only other issue is that I can't set a column format to be HH:mm, I set it and it ignores it. Field is mapped correctly as DateTime. Not the end of the world but would be nice as it's been picked up in UAT.
Ah, I didn't realize you were using such an old version. Now that you mention that, I think I remember that there might have been a bug in the FilterCell that caused it to show extra text like what you have in your screen shots. I thought it was fixed a long time ago, but maybe it still existed in v13.1.
As for the Format not working, Format only affects the display when a cell is not in edit mode.
One reason why the format would not work is if the column is the wrong data type. You can't format a string column, for example.
Another is if you are setting the CellDisplayStyle on the column to a setting that disables formatting.