Hi,
I'm using a Wingrid 8.2and I've bound my grid to a dataset coming from a oracle 10 database. One of the columns is a byte-array containing jpeg-data. I use the following code in InitializeLayout;
ugrdThis.DisplayLayout.Bands[0].Columns["MyImageCol"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Image; ugrdThis.DisplayLayout.Bands[0].Columns["MyImageCol"].Style.Editor = new Infragistics.Win.EmbeddableImageRenderer();
After that the cells in MyImageCol-column are showing the string "System.Byte[", thats it.
What's remarkable too: If I debug the column after codeline above, the Editor-property of the column will display the exception:
"EmbeddableImageRenderer does not support editing."
over the "Value"-property.
What's wrong?
Thanks, Alex
I don't think that the editor is going to try to parse a byte stream into an Image automatically. It would be far simpler for you to load the data into a MemoryStream and create the image from that. If you don't want to do this on the DataSource, you could handle the InitializeRow event, hide the bound Byte[ column, and create a new unbound column; each cell in this unbound column would be of type Image, where you could set the value.
-Matt
Hi Matt,
thanks for reply. I also thaught about something like that but wanted to ensure not to spend too much work in reinventing the fire ;-).
Alex