Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
WinGrid column image from oracle
posted

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

Parents
  • 37774
    Verified Answer
    posted

    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

Reply Children
No Data