473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How can I add image in a datagrid?

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
tr********@hotmail.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
2 2349
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" <tr********@hotmail.com> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl...
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
tr********@hotmail.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #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" <tr********@hotmail.com> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl...
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
tr********@hotmail.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: DraguVaso | last post by:
Hi, I have an inherited DataGrid, that does lots of extra stuff. For exemple drawing a backgroundimage in every cell. The problem is that it's taking too much time (using gdi+), so I want to do...
1
by: Jim Hammond | last post by:
The code below implements two datagrid columns that display images. The first column is just a test that always displays the same image directly from a file. The second column pulls the image from...
1
by: John Thompson | last post by:
We're sooo close. When we load the page to upload the image, all of the prms go through except the binary image data. Using SQL server with the data type set to "image". Please help! Thanks-...
4
by: nicholas | last post by:
How can I show or hide an image in a datagrid depending on a field. Something like: if myfield <> "" then 'show image' else 'show noimage.gif' end if the image field contains the image name...
2
by: SQL_Klovn | last post by:
Hi! I have been struggeling for quite some time now with a stupid problem which drives me crazy. I have Datagrid, where I load some images from a SQL2000 database. This works fine, but I am not...
13
by: Neo Geshel | last post by:
I have examined about 80+ different upload scripts on the 'net, both in VB and C#, and none seem to do what I need them to do. Perhaps someone here can point me somewhere that Google hasn't...
1
by: ltt19 | last post by:
Hi everyone! I want to do da Image gallery using just the datagrid, this one will dilpays only images, no text, that means that it will have about 4 Collumns that will displays just images from...
0
by: Tim::.. | last post by:
Please, please, please help!!! I have a datagrid that displays a list of contacts on our intranet site using the ActiveDirectory as it's main Data Source. I want to be able to show an image of...
1
by: Michael Turner | last post by:
Anyone know if you can add a background image to a datagrid, there is a property for colour but not for an image.
0
by: rockdale | last post by:
Hi, All: I dynamic add an arrow up/down image in OnItemDataBound event for my datagrid, it works fine. But I have another textbox which trigger postback and doing something, after this event get...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.