Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

How to display different type of images in datagridview multiple existing rows and columns in c# .net windows aplication?

$
0
0

Hello,
 
I am using this code for display an image in the data grid view, but my problem is not solved.
please help me.:-

private void CreateColumns()
        {
            
            for (int i = 0; i < dgvDisplayTiles.Rows.Count; i++)
            {
                Bitmap bmpImage = null;
               
                bmpImage = (Bitmap)Image.FromFile(Application.StartupPath + dgvDisplayTiles.Rows[i].Cells[3].Value.ToString(), true);
                dgvDisplayTiles.Rows[i].Cells[3].Value = bmpImage;
                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



Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>