Solved

How to Save/Get images from DataGridViewImageColumn

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now