How can I add image in a datagrid?

Discussion in 'ASP .Net' started by Trint Smith, Apr 8, 2004.

  1. Trint Smith

    Trint Smith Guest

    In my code, I would like to add an image to a datagrid...how can I do
    that to this code:

    dt = New DataTable
    dt.Columns.Add(New DataColumn("Image", GetType(String)))
    dt.Columns.Add(New DataColumn("Description", GetType(String)))
    dr = dt.NewRow()
    Image = dtrSQL.Item("item_image").ToString()
    dr(0) = Image
    Description= dtrSQL.Item("item_description").ToString()
    dr(1) = Description

    Thanks,
    Trint

    .Net programmer


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Trint Smith, Apr 8, 2004
    #1
    1. Advertising

  2. dt = New DataTable
    dt.Columns.Add(New DataColumn("Image", GetType(String)))
    dt.Columns.Add(New DataColumn("Description", GetType(String)))
    dr = dt.NewRow()
    Image = dtrSQL.Item("item_image").ToString()
    dr(0) = "<img src=" & Image & ">" <-------
    Description= dtrSQL.Item("item_description").ToString()
    dr(1) = Description

    Brun


    "Trint Smith" <> wrote in message
    news:...
    > In my code, I would like to add an image to a datagrid...how can I do
    > that to this code:
    >
    > dt = New DataTable
    > dt.Columns.Add(New DataColumn("Image", GetType(String)))
    > dt.Columns.Add(New DataColumn("Description", GetType(String)))
    > dr = dt.NewRow()
    > Image = dtrSQL.Item("item_image").ToString()
    > dr(0) = Image
    > Description= dtrSQL.Item("item_description").ToString()
    > dr(1) = Description
    >
    > Thanks,
    > Trint
    >
    > Net programmer
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Bruno Sirianni, Apr 9, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MattB
    Replies:
    0
    Views:
    451
    MattB
    Mar 8, 2005
  2. pmclinn
    Replies:
    0
    Views:
    5,386
    pmclinn
    Jun 22, 2006
  3. Laszlo Zsolt Nagy
    Replies:
    1
    Views:
    1,432
    Kartic
    Jan 26, 2005
  4. Andreas Klemt
    Replies:
    0
    Views:
    333
    Andreas Klemt
    Oct 8, 2003
  5. Richard
    Replies:
    1
    Views:
    299
    Rick Spiewak
    Aug 7, 2004
Loading...

Share This Page