•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 456,508 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,673 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 2476 | Replies: 6
![]() |
•
•
Join Date: Aug 2006
Posts: 57
Reputation:
Rep Power: 3
Solved Threads: 0
hi all,
i am trying to display a xml file in a datagridview.
i am using windows application with C#.
say for example, i have a xml file like this,
<xml version="1.0" encoding="UTF-8">
<maincategory>
<cat1>
<title>Category1</title>
<link>http://www.w3schools.com</link>
<description><img src="http://static.ibnlive.com/pix/sitepi...tu90.jpg" alt="some description</description>
</cat1>
<cat2>
<title>Category2</title>
<link>http://www.ibnlive.com</link>
<description><img src="http://static.ibnlive.com/pix/sitepi...te90.jpg"
some description</description>
</cat2>
</maincategory>
in the description i have a img tag containing a image from any site.
i have columns to display title,description.
i need to display the image along with the text in the same column description.
Adding an image column will display the image as a separate column. how can i display the image in the same column
along with the text?
Thanks in advance
Regards
Exelio
i am trying to display a xml file in a datagridview.
i am using windows application with C#.
say for example, i have a xml file like this,
<xml version="1.0" encoding="UTF-8">
<maincategory>
<cat1>
<title>Category1</title>
<link>http://www.w3schools.com</link>
<description><img src="http://static.ibnlive.com/pix/sitepi...tu90.jpg" alt="some description</description>
</cat1>
<cat2>
<title>Category2</title>
<link>http://www.ibnlive.com</link>
<description><img src="http://static.ibnlive.com/pix/sitepi...te90.jpg"
some description</description>
</cat2>
</maincategory>
in the description i have a img tag containing a image from any site.
i have columns to display title,description.
i need to display the image along with the text in the same column description.
Adding an image column will display the image as a separate column. how can i display the image in the same column
along with the text?
Thanks in advance
Regards
Exelio
Last edited by Exelio : Sep 24th, 2007 at 10:38 am.
look you can make gridview cell to be a control, i.e PictureBox and then assign to this control the image path.
the scenario is, there is a base class you inherits from.
This was from MSDN but I am sorry I don't remember the link :s
the scenario is, there is a base class you inherits from.
This was from MSDN but I am sorry I don't remember the link :s
B.Sc Computer Science, Helwan University
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
•
•
Join Date: Jun 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
hi all,
i am trying to display a xml file in a datagridview.
i am using windows application with C#.
say for example, i have a xml file like this,
<xml version="1.0" encoding="UTF-8">
<maincategory>
<cat1>
<title>Category1</title>
<link>http://www.w3schools.com</link>
<description><img src="http://static.ibnlive.com/pix/sitepi...tu90.jpg" alt="some description</description>
</cat1>
<cat2>
<title>Category2</title>
<link>http://www.ibnlive.com</link>
<description><img src="http://static.ibnlive.com/pix/sitepi...te90.jpg"
some description</description>
</cat2>
</maincategory>
in the description i have a img tag containing a image from any site.
i have columns to display title,description.
i need to display the image along with the text in the same column description.
Adding an image column will display the image as a separate column. how can i display the image in the same column
along with the text?
Thanks in advance
Regards
Exelio
•
•
Join Date: Nov 2006
Location: iran-tehran
Posts: 47
Reputation:
Rep Power: 0
Solved Threads: 0
i have the same problem , for example on of the columns of the Data grid is for something that is proposed to show a picture , for example imagine a mailbox which the attachment column in that is "Checked" for mails with an attachment file and "Unchecked" for others , I've tried to bind an image with that column but it didn't work
•
•
Join Date: Jul 2008
Posts: 89
Reputation:
Rep Power: 1
Solved Threads: 9
My idea is to create a 'User Control' that will have to fields a 'Label' and a 'PictureBox' and it will expose both as pulbic properties so you can then intanciate the 'User Control', set the Label's property as the image description and the PictureBox's(PictureBox's Image property) property as the actual image and then add the new User Control to the DataGrid's Cell.
The same idea but a diferent approche that I like better(better encapsulation ) is
Instead of exposing the PictureBox in the User Control as a public poperty expose the PictureBox's ImageLocation property as a public property.
P.S- I am going to try it to see exactly how it works.
Thanks,
Camilo
The same idea but a diferent approche that I like better(better encapsulation ) is
Instead of exposing the PictureBox in the User Control as a public poperty expose the PictureBox's ImageLocation property as a public property.
P.S- I am going to try it to see exactly how it works.
Thanks,
Camilo
Last edited by camilojvarona : Jul 11th, 2008 at 8:52 pm.
•
•
Join Date: Jul 2008
Posts: 89
Reputation:
Rep Power: 1
Solved Threads: 9
Hi,
My idea is to create a 'User Control' that will have to fields a 'Label' and a 'PictureBox' and it will expose both as pulbic properties so you can then intanciate the 'User Control', set the Label's property as the image description and the PictureBox's(PictureBox's Image property) property as the actual image and then add the new User Control to the DataGrid's Cell.
The same idea but a diferent approche that I like better(better encapsulation ) is
Instead of exposing the PictureBox in the User Control as a public poperty expose the PictureBox's ImageLocation property as a public property. And instead of expose the Label
expose the Label's Text property.
P.S- I am going to try it to see exactly how it works.
Thanks,
Camilo
My idea is to create a 'User Control' that will have to fields a 'Label' and a 'PictureBox' and it will expose both as pulbic properties so you can then intanciate the 'User Control', set the Label's property as the image description and the PictureBox's(PictureBox's Image property) property as the actual image and then add the new User Control to the DataGrid's Cell.
The same idea but a diferent approche that I like better(better encapsulation ) is
Instead of exposing the PictureBox in the User Control as a public poperty expose the PictureBox's ImageLocation property as a public property. And instead of expose the Label
expose the Label's Text property.
P.S- I am going to try it to see exactly how it works.
Thanks,
Camilo
Last edited by camilojvarona : Jul 11th, 2008 at 9:41 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Generate Thumbnail images on the fly. (PHP)
- Image in DataGridView (C#)
- images no longer animated (Web Browsers)
- no images (Web Browsers)
Other Threads in the C# Forum
- Previous Thread: OLEDB QUERY If user input has ' query fails.
- Next Thread: Text file encoding


Linear Mode