we have stored Images as BLOB fields in mYSQl datbase.can anyone help us like how to display BLOB filed in ultrawingrid?Thank you.
Hi,
What kind of data is in your BLOB and what do you want to do with it? The grid doesn't have any built-in support for BLOBs, so you probably just have to convert your BLOB into some kind of DotNet object before the grid can do anything with it.
Images are stored in BLOB field. can anyone help me on how to display the image in Grid.Thank you.
Thanks a lot. it worked.
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