?
Solved

How to Save/Get images from DataGridViewImageColumn

Posted on 2009-05-10
1
Medium Priority
?
486 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
chrisbray earned 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

801 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