Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to show images in the Datagrid

How to show images in the Datagrid

Scheduled Pinned Locked Moved ASP.NET
databasetutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kurian_Kurian
    wrote on last edited by
    #1

    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(); } } } }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups