Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am using this code for display an image in the data grid view, but my problem is not solved.
please help me.:-
C#
private void CreateColumns()
        {
            for (int i = 0; i < dgvDisplayTiles.Rows.Count; i++)
            {
                dgvDisplayTiles.Rows[i].Cells[3].Value = Image.FromFile(Application.StartupPath + dgvDisplayTiles.Rows[i].Cells[3].Value.ToString());
                dgvDisplayTiles.Rows[i].Height = 100;
            }    

        }
I am displaying images in datagridview existing column but it's not displaying.
My image column datatype is "varchar" in sql server, i can't image datatype in sql server and my image path saved in my image column, I have also image column in datagridview for image display.
So, I want to display image in datagridview existing column,
Please send me the correct suggestion or code.

Thanks in Advance.

Ankit Agarwal
Software Engineer
Posted
Updated 9-Dec-13 21:34pm
v6

1 solution

 
Share this answer
 
Comments
[no name] 10-Dec-13 1:51am    
I also tried this solution but my problem not solved.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900