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 6323229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:28:46+00:00 2026-05-24T16:28:46+00:00

I have data grid view with columns product name and product image and I

  • 0

I have data grid view with columns product name and product image and I am populating these values coming from database…

i am using winforms desktop application…..

my problem is I am not able to showing the image in datagridview cell properly ..see the diagram belowtotal grid view image

i want to display this image in actual product image column for every cell in that column actual image need to show in every row

this task is very simple in webforms by using datalist control but i dont know how to display full image in grid view cell

can any one help on this….

many thanks…….

and this is where i am binding the datagridview by using linq query..

      private void EquipmentFinder_Load(object sender, EventArgs e)
     {

        var products = from prods in abc.products
                       select new
                       {
                           productid = prods.product_Id,   //0                            
                           productname =  prods.product_Name, //1
                           productimage = prods.product_Image, //2
                           productprice = prods.product_Price,//3
                           productdescr = prods.product_Description, //4

                       };
        productbindingsource.DataSource = products;
        productgridview.DataSource = productbindingsource;
        productgridview.Columns[0].Visible = false;
        productgridview.Columns[3].Visible = false;
        productgridview.Columns[4].Visible = false;
    }
  • 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-05-24T16:28:47+00:00Added an answer on May 24, 2026 at 4:28 pm

    Set the column’s ImageLayout to the Stretch value to resolve this problem.

    UPDATE: use the following code to change the ImageLayout property:

    for(int i = 0; i < dataGridView1.Columns.Count; i ++)
                    if(dataGridView1.Columns[i] is DataGridViewImageColumn) {
                        ((DataGridViewImageColumn)dataGridView1.Columns[i]).ImageLayout = DataGridViewImageCellLayout.Stretch;
                        break;
                    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Grid View Data Bind i have a database table with 4 columns having data
I have a SQLite database that is displayed in a data grid view in
I have this code I want to bind data to grid view without using
I have a data grid view ( say 5 columns ) . User has
I have a Data Grid View and some of the columns are of type
I have a grid in which, I load data from database. I need to
Using the ASP.NET grid view. It displays 3 columns with 1 row for each,
I have two classes(Book,Software) that inherit from the Product class. these two classes have
I have a data grid view in one windows form named GridViewForm. When the
I have a data table. After creating this table, I use data grid view

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.