473,624 Members | 2,119 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(dgiI tem.FindControl ("Image1"), WebControls.Ima ge)

.ImageUrl = sAddPath & "AT1.JPG"

.DataBind()

End With

Next

What am I doing wrong?

Regards,

Don Buchanan
Nov 20 '05 #1
2 1253
Cor
Hi Don,
Dim dgiItem As DataGridItem
For Each dgiItem In DataGrid1.Items
With DirectCast(dgiI tem.FindControl ("Image1"), WebControls.Ima ge)
.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(dgiI tem.FindControl ("Image1"), WebControls.Ima ge)
.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
1618
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 Many thanks :D
3
2537
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 "Resource" with the following structure : Resource{,en,fr,es} Yes.. these are the only languages supported actually. A couple of rows in that table would look like this :
4
3026
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 that page. Each row in each datagrid includes a Delete button (added at runtime by the code-behind page as a ButtonColumn) and an Edit button (added at runtime by the code-behind page as an EditCommandColumn). What is the quickest, easiest and...
0
773
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 DataGridItem For Each dgiItem In DataGrid1.Items With DirectCast(dgiItem.FindControl("Image1"), WebControls.Image)
3
2514
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 others. One of the custom format is as follows: dsmessages_dt.Columns.Add("Image", GetType(Image)) I had a problem of when I used a checkbox in the grid that was bound to the datatable that it would not update my dataset. So I created another...
3
3536
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 can get this to work; however, the column header on the datagrid is not a link/sortable. What am I missing? Thanks in advance.
4
1599
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 is that if the value equals 1, replace that value with a small icon image. if it equals 0 then have nothing display in that column. can this be done? please bear in mind that i'm relatively new to asp.net. i'm currently using VS2005 and .net...
2
9594
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) http://www.electricphase.com/example/example2.php (uses http://www.electricphase.com/example/test2.css)
0
1759
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 until the last moment When Access 2007 gives the message "Graphic Filters Not Installed" and the image does not display. I have installed the Graphic Filters from the MS Office 2007 disc..but I still get the same message.
0
8172
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8677
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8474
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7158
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.