473,396 Members | 1,812 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.

DataGrid Display Graphic

I'm trying to get a single column DataGrid to display a graphic. I set up
the DataGrid template to display and image. This is what I've tried based on
the example I found:

Dim dgiItem As DataGridItem

For Each dgiItem In DataGrid1.Items

With DirectCast(dgiItem.FindControl("Image1"), WebControls.Image)

.ImageUrl = sAddPath & "AT1.JPG"

.DataBind()

End With

Next

What am I doing wrong?

Regards,

Don Buchanan
Nov 20 '05 #1
2 1238
Cor
Hi Don,
Dim dgiItem As DataGridItem
For Each dgiItem In DataGrid1.Items
With DirectCast(dgiItem.FindControl("Image1"), WebControls.Image)
.ImageUrl = sAddPath & "AT1.JPG"
.DataBind()
End With
Next
What am I doing wrong?


Did you check if a datagrid column can hold graphic data as far as I know it
can not
Did you check if you can add items to a datagrid, as far as I know you can
only bind them using an underlaying table

Cor
Nov 20 '05 #2
Cor
Hi Don,
Dim dgiItem As DataGridItem
For Each dgiItem In DataGrid1.Items
With DirectCast(dgiItem.FindControl("Image1"), WebControls.Image)
.ImageUrl = sAddPath & "AT1.JPG"
.DataBind()
End With
Next
What am I doing wrong?


Did you check if a datagrid column can hold graphic data as far as I know it
can not
Did you check if you can add items to a datagrid, as far as I know you can
only bind them using an underlaying table

Cor
Nov 20 '05 #3

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

Similar topics

1
by: chantao | last post by:
Hi I am a total novice to PHP/MYSQL. Please help How do I display a graphic file (e.g. archit01.jpg) as a background i a table of a PHP page if I have a table called gfx and th gfx_ID=archit0...
3
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
4
by: DrData | last post by:
I'm working on an ASP.Net application written in C#. On one page, there are several datagrid controls used to display, edit and delete detail records relating to the master record also displayed on...
0
by: Don Buchanan | last post by:
I'm trying to get a single column DataGrid to display a graphic. I set up the DataGrid template to display and image. This is what I've tried based on the example I found: Dim dgiItem As...
3
by: Datatable Dataset Datagrid help | last post by:
Hi I am somewhat confused, I am new at VB.net I use XML data, I have a datagrid, I created a datatable so that I can create a custom format like true is this graphic false is this graphic and...
3
by: TPhelps | last post by:
I have a sample of an unbound (autogeneratecolumns is true) sortable/pagable datagrid that works. I want to change one of the columns to a hyperlink. The examples I find use a bound column. I...
4
by: simon | last post by:
hello, i am displaying a dataset in a datagrid, for one of the values being displayed it either comes back as a 1 or a 0, which is currently bound to a column in the datagrid what i'd like to do...
2
by: Good Man | last post by:
Hi there I have quite a bit of experience with CSS but I am stumped by the following: http://www.electricphase.com/example/example1.php (uses http://www.electricphase.com/example/test1.css) ...
0
by: bobdydd | last post by:
Hi All I am using the common dialog routine to insert a pathway to a jpeg To display on a form that worked perfectly well in Access 2000. Now using the same setup everything works as before...
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: 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: 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:
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
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
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.