Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7989393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:44:27+00:00 2026-06-04T12:44:27+00:00

How do you load an image from a URL and then put it into

  • 0

How do you load an image from a URL and then put it into DataGridView’s cell (not Column header)? The rows which include the images will be added to the view at runtime based on a search from web service. Cannot find an answer for this specific purpose… Help!

First I tried using PictureBox. When events are received from web service, I will loop thru result to add rows, each of which includes an image.

// Add image
System.Windows.Forms.PictureBox picEventImage = new System.Windows.Forms.PictureBox();
picEventImage.Image = global::MyEventfulQuery.Properties.Resources.defaultImage;
picEventImage.ImageLocation = Event.ImageUrl;
this.dgvEventsView.Controls.Add(picEventImage);
picEventImage.Location = this.dgvEventsView.GetCellDisplayRectangle(1, i, true).Location;

Even though the image loads perfectly, it looks disconnected from the view, i.e. images does not move when I scroll, and when refreshing the view with new data, images just hang around… bad.

So I tried tips from other postings:

Image image = Image.FromFile(Event.ImageUrl);
DataGridViewImageCell imageCell = new DataGridViewImageCell();
imageCell.Value = image;
this.dgvEventsView[1, i] = imageCell;

But I got an error saying
“URI formats are not supported.”

  • Am I using Image incorrectly?
  • Is there another class that I can use for URL image instead of Image?
  • Or do I have no choice but to create a custom control (which contains a PictureBox) to add to the DataGridView cell?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:44:28+00:00Added an answer on June 4, 2026 at 12:44 pm

    Have a look at this SO Post https://stackoverflow.com/a/1906625/763026

     foreach (DataRow row in t.Rows)
        {
                        HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(row["uri"].ToString());
                        myRequest.Method = "GET";
                        HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
                        System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(myResponse.GetResponseStream());
                        myResponse.Close();
    
                        row["Img"] = bmp;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found difficulty to load image from url in every 30 seconds in android
I want to load the image URL from my NSMutableArray. Here is my Code:
I'd like to load images from json data which contains the url to these
I use below code to load image from URL in my winodws phone 7
I basically would like to load an image from a url to an activity
I have to download an image from a url and then show the downloaded
i can't download more then one image from url function processXML(e:ResultEvent):void { myXML =
I want to load images from a URL and then assign them as background
I need to load an image from a web in a simple Java stand
If I load an image from a file like this Image1.Picture.LoadFromFile(imagePath); and the JPEG

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.