How to I set a column to only show the image and not the text. I have an image being set in each cell based on it's value (either 1 or 0), but I don't want the 1 or 0 to show up. When I set the
ProductGrid.DisplayLayout.Bands[0].Columns["Sensitive"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Image;
nothing shows up. Any ideas of how to do this simply?
Thank you,
Susan
Set the MaxDropDownItems to something bigger. It default to 8, I think.
Mike -- How do I control the size of the ValuList dropdown? I want it to expand to the full list.
Thanks a lot Mike, ValueList idea worked !
Hi Mike, thank you for your answer. I'll try it.
Clay
Hi Clay,
I don't think this will work the way you have it. The problem is that when you have a dropdown in a cell, the grid uses a Combo Editor for that cell. The Combo Editor can't display an image from a Byte array. In order to do that, you would have to use a different type of editor (an UltraPictureBox, basically).
Using an UltraCombo to provide a dropdown list in a cell is rather inefficient, anyway. What you should use is a ValueList.
Here's what you do:
In the InitializeLayout event of the grid, add a ValueList to the e.Layout.ValueLists collection. You can bind this list if you list or populate it manually with your integers. Then you need to set the Appearance.Image on each ValueList item on the list. Set the DisplayStyle on the ValueList to Picture and use this ValueList as the ValueList property of the column.