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
Hi Mike
I made the following:
-a UltraGrid with a column that cointains integer values. Set the column style to DropDownList.
-a UltraCombo with two columns. One column with integers, one column with byte[ (Images). set column style of the second column to Image. set DisplayMember to second column (Image), set ValueMember to first column (integer)
-set the UltraCombo to the ValueList of the grid column.
This works everywhere I have only text as DisplayMember but not with Image as DisplayMember. I just want to see the selected Image in the grid, not the number or a text. Is that possible?
Thank you and best regards
Clay
Hi Clay,
I need more information. What data type is the grid column? What's the data type of the column in the dropdown that contains the images?
Hi
I have a very similar problem. I have a grid with a UltraCombo in one column. In the UltraCombo there are only images shown. This works if theUltraCombo is droppeddown. But if I select one item in the combo, in the grid isn't displayed the image,there I see: System.Byte[.
I tried to set the ColumnStyle of the grid column to Image, but then I get an error. How can I make, that in the grid the selected Image is shown?
Best regards
Hi Susan,
The Image Style of the column displays the actual cell value as an image. But your cell values are not images, they are numeric (0 or 1), so this won't work.
Do you want the cell to act like a checkbox? If so, you could achieve what you want to do using the UltraCheckEditor control in Custom Style.
Another option would be to use a ValueList and set it's DisplayStyle to Picture.
Still a third option would be to use a CreationFilter to override the creation of the cell elements.
It depends what you want - a checkbox, a dropdown, or just a read-only cell.