473,395 Members | 1,774 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,395 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 2348
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.