Hi again,
I am using an UltraComboEditor within my UltraWinGrid to display different sorts of drop-down-lists (text only, text with image or image only). For text only and text with image, positioning of the elements and displaying of the drop-down-list work fine so far.
(1)But when I want to display only images (no text, neither DisplayText nor DataValue), I would like the images to be displayed centered within the drop-down-list. I am using DropDownListAlignment.Center but without effect. I guess this is caused by the fact that the size of the actual item is limited to the size of the image (plus text) but does not span the whole width of the drop-down-list. How can I adapt to this?
(2)Furthermore, when I click a cell containing the ComboEditor and it goes into EditMode, the TextEditor is being displayed on top of my image. I would like to achieve that no TextEditor is being displayed in this case, so that the user can see the currently selected image.
(3)The whole grid has been styled. I would like to set the BackColor of the list item on which my mouse is currently over to be the same color than the BackColor of my currently selected row(s).
(4)Since the App has been designed for touch input, I would like to adapt the width of the DropDownButton.
I have been looking to adapt these features on my own, but tbh it's quite a waste of time when you don't know where to look at... I hope you can point me in the right direction :-)
I did find an answer to (4), but it does not make me too happy, since I am also using ScrollBars in my App. I guess they would be affected as well?
http://community.infragistics.com/forums/t/25261.aspx
Is there any new development concerning this issue?
Hi,
I'm having a little trouble following all of your requirements here. Just to make sure I have it right, what you want here is a dropdown in a column that shows only images and no text and when you select an item on the list, the image appears in the cell and is centered. And all of this is on a touch-screen, so you want the list items and the dropdown button to be large enough to click on with a finger.
Is that right?
What's the DataType of this column? Are you storing an image in the data, or is it a numeric field and you just want to map the numbers into pictures?
Indeed, sorry for the flood of information here, I'll try to clear it up...
What you wrote above is about right, except that the touch functionality is optional (both, mouse usage and touch screen usage should be possible). But that is the exact reason why I would like the DropDownButton as well as the list items to be bigger (fat fingers syndrome).
The DataType of the column is 'String'. The problem is that the grid is being filled from a DataTable automatically and only after the grid has been filled I do attach the UltraComboEditors and their regarding ValueListItems, which are read from an external XML file. So the column first gets filled with a string value, then the UltraComboEditor is put on top of it.
When I try to change the DataType at this point, it won't let me do it (ArgumentException, 'DataType can only be set for an unbound column').
The DataValue is numeric, representing an unique id for the image (which is also stored in the DB). The image itself is being allocated to the valueListItem.Appearance.Image property.
I do not know upfront which of the columns will be equipped with UltraComboEditors, neither do I know upfront if there will be only images or images with text or just text. That all comes from the external XML file... Sounds messy, and it is!
weirdal said:Maybe I did not describe the issue properly. I do not want to change the BackColor of each item in the list, but I want to change the HotTrackColor of the item the mouse is currently over. I guess that is a little harder to achieve, at least I was not able to find a suitable property.
I don't think this is exposed anywhere for a ValueList. If you need to change this color, you would either have to use a DrawFilter or else use UltraCombo instead of UltraComboEditor.
weirdal said:Also, I would like to change the highlighting color of selected text in a TextEditor. Highlighted text and HotTrack color are the same color, but probably not the same property.
This is not possible. UltraTextEditor uses the TextBox control when it does into edit mode and the TextBox does not expose any way to change the selection color - it always uses the system color.
You might be able to achieve what you want using the FormattedTextEditor instead of the TextEditor, though.
(1)Fixed. Thanks Mike, am a bit stressed atm and just didn't see it.
(3)Maybe I did not describe the issue properly. I do not want to change the BackColor of each item in the list, but I want to change the HotTrackColor of the item the mouse is currently over. I guess that is a little harder to achieve, at least I was not able to find a suitable property.
Also, I would like to change the highlighting color of selected text in a TextEditor. Highlighted text and HotTrack color are the same color, but probably not the same property.
weirdal said:(1)Not fixed yet.
Why is this not fixed? The sample I posted here shows all of the images centered and there is no text displayed.
weirdal said:(3)Not fixed yet.
All you have to do for this one is apply an appearance to each item on the list. The same appearance (including the image) will be applied to the grid cell.
thanks alot for that, Mike!
Your sample definitely brought me onto the right track for some of the issues... So, here is what I did to fix them:
(1)Not fixed yet.
(2)My mistake was to set the DropDownStyle.DropDownList property on the comboEditor instead of setting ColumnStyle.DropDownList on the column. Now works like a charm!
(3)Not fixed yet.
(4)The very same setting (ColumnStyle.DropDownList) fixed also this issue, since now the cell won't go into EditMode anymore, but drop down the list as intended. Since the list also drops down when you click on the cell rather than the buton, the need for a larger button is now obsolete.
So, all in all the essential mistake was setting these properties on the comboEditor instead of the column!
€: Oops didn't see you replied meanwhile... will look at it immediately!
Uh, my bad...
What I was trying to say is that the DataValue ofc is a string, but it's a numeric character :-) In the DB it is stored as a string, that's working fine.
When I reload the data, the string value that is loaded is correctly getting mapped into the image it should represent (means, the correct image is being displayed).
Only when I enter EditMode, an TextEditorUIElement (or something like that) is drawn over the image so that the user sees the string (numeric) value instead of the image.
I've attached a few screenshots for clarification...
Screenshot 1 shows the grid directly after it was loaded.
- Header2 = Images and text- Header3 = Just images- Header4 = Just text
As you can see from the other screenshots, behavior for 'Images and text' and 'Just text' is ok, only when I click on the DropDownButton of the 'Just images' column, the DataValue is shown in the Editor instead of the selected image.
Sorry for all the spam :-)