How to show images in the Datagrid
-
Hi.I want to show the images in the datagrid.i want to bound the datasource into datagrid.the method i used for retrieving images is written down.using this method am getting other fields.i add one template column in the datagrid and add one image control in that item template,the template column datafield given this sql image column name.sql image datatype is Image.i want to show all the images in the datagrid. public static DataSet getImages() { DataSet ds = new DataSet(); using (SqlConnection conn = new SqlConnection(connectionString)) { using (SqlCommand cmd = new SqlCommand("SPOC_PHOTOS_SELECT", conn)) { cmd.CommandType = CommandType.StoredProcedure; using (SqlDataAdapter da = new SqlDataAdapter()) { da.SelectCommand = cmd; try { conn.Open(); da.Fill(ds); return ds; } catch (Exception e) { throw e; return null; } finally { conn.Close(); } } } }