we have stored Images as BLOB fields in mYSQl datbase.can anyone help us like how to display BLOB filed in ultrawingrid?Thank you.
Thanks a lot. it worked.
Hi,
If you need any additional assistance don’t hesitate to ask.
Regards
Hello sweish,
sweish said:Image is stored in daatbase by the users
conn.Open(); using (Command cmd = new Command(sqlCommand, conn)) { using (IDataReader dataReader = cmd.ExecuteReader()) { while (dataReader.Read()) { byte[] byteArray= (Byte[])dataReader["BLOBField"]; }
ultraGrid1.ActiveRow.Cells["bimage"].SetValue(byteArray,false); } }
Also for me is interesting to know what is your approach to connect with database. Are you using TableAdapters, SQL commands and so on...? Did you set Style property of your column to be Image ?
sweish said: So there will not be any physical image file. Without storing the image anywhere while retrieving
If you have any questions, feel free to write me
Thank you so much for the reply.
Image is stored in daatbase by the users. So there will not be any physical image file.
Without storing the image anywhere while retrieving, is there any way to convert the BLOB field into byte() array and display in grid.
Thank you.
Sorry, but I forgot to mention that you should change the Column`s style to be image. For example:
ultraGrid1.DisplayLayout.Bands[0].Columns["bimage"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Image;
Let me know if you have any questions