Hello out there,
I have an ComboBox which is connected to a DataSet with small Images (and an hidden value column).
If I press the Button on the ComboBox, the images are show and I can select one.
But, when I do this, the Image is not shown in the Combobox, but it's type: System.Drawing....
How can I modifiy the ComboBox to show my Images?
Thanks,
Frank
Hi,
I can't see anything wrong with this code. This looks like a bug to me. When the cell is active, for some reason, it's just not showing the image.
I'm forwarding this thread over to Infragistics Developer Support so they can write this up for developer review.
Sure, see attached.
We seem to be going in circles here. :)
Perhaps it would be best if you created a small sample project demonstrating the behavior you are getting so I can see what's wrong.
I switched the datatype to integer and there was no difference in behavior! In any case...
Your comments have me thinking I don't need the unbound column. I should be able to get what I want by assigning the UltraComboEditor as the EditorControl of the original integer column and just display as images.
In fact I was able to do this, so it's a step forward. I am now able to change the value via the dropdown of images, but there are still two problems:
1) When a cell enters edit mode and the dropdown list is opened, the current cell value disappears.
2) When a list item is selected and the dropdown closes, the cell doesn't show its new image until it loses focus.
It seems the WinComboEditor is confused about how to display the current value when in edit mode. How can I tell it to take the current value and use it as an index into the imagelist? Remember that the value list already displays correctly, and after changing focus to another cell, the first cell repaints correctly.
bobgru said:The column on which the EditorControl is set has DataType = typeof(Bitmap).
Okay... that's why it doesn't work. If your ValueList has integers in it, then when you select an item on the ValueList, it will try to put an integer into the cell. An integer is not a Bitmap and cannot be converted to one.
If you want the column to be of type Bitmap, then your ValueList would have to contain Bitmap values. If you are mapping an integer value to an image, then you should make the column of type Integer.