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
Solved

How to Save/Get images from DataGridViewImageColumn

Posted on 2009-05-10
1
480 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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