473,395 Members | 1,488 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 2347
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
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
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...

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.