Solved

How to Save/Get images from DataGridViewImageColumn

Posted on 2009-05-10
1
477 Views
Last Modified: 2013-12-17
I have a simple datagridview with 3 columns.
column1 is a DataGridViewImageColumn
column2 is a TextBoxColumn
column3 is a TextBoxColumn

I'm trying to save all the cells with the code below.
The problem is that I don't understand how I could save/get the images from the imagecolumn ?
Any easy suggestions ?
foreach (DataGridViewRow xx in dataGridView1.Rows)
            {
 
                string col2 = xx.Cells["Column2"].Value.ToString();
                string col3 = xx.Cells["Column3"].Value.ToString();
            }

Open in new window

0
Comment
Question by:Smyken
1 Comment
 
LVL 3

Accepted Solution

by:
chrisbray earned 500 total points
ID: 24347949
I am not able to test this at the moment, but you should be able to simply go:

Image image = (Image)xx.Cells["Column2"].Value;

Chris Bray


0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Video Player 11 23
Finally almost got it 5 36
2 questions 10 25
Calculate number of nights between two dates 5 19
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question