Search code examples
c#datagridviewpictureboximageurl

How to take a image url from a datagridview and put it into a picturebox in c#


Good day

I am needing help

I want to take an image url that is in a datagridview which is connected to a database and add the url to a picturebox in c#.

I have searched for it but had no luck


Solution

  • I came right

        private void dgData_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            picData.ImageLocation = dgData.CurrentRow.Cells[1].Value.ToString();
            picData.SizeMode = PictureBoxSizeMode.StretchImage;
        }
    

    This worked very well