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

  • Home
  • SEARCH
  • 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 6585873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:43:07+00:00 2026-05-25T16:43:07+00:00

I have done like this for sending gridview row values from one form to

  • 0

I have done like this for sending gridview row values from one form to another

i have datagrid view with columns productdescription , productimage , productname

my main aim is if, i select the image cell in datagridview the selected image and the values of row which row has that image need to send to another form …

in the below code only image will be transferred to another form i need to send another values also …

i have searched a lot but i didnot find any solution.. and the code is given below….

      private void productGridview_Cellclick(object sender, DataGridViewCellEventArgs e)
      {
        byte[] bits = null;
        Image img = null;

            if (e.ColumnIndex != productgridview.Columns["productimage"].Index) return;

            if (productgridview.SelectedCells.Count == 0) return;

            bits = (byte[])productgridview.SelectedCells[0].Value;
            img = bytearraytoimage(bits);


            if (img is Image)
            {
                using (ProductDescriptionForm pf = new ProductDescriptionForm())
                {
                    pf.picture = img;



                    pf.ShowDialog(this);
                }
            }

    }

and in productdescription form i have defined like this …

   public partial class ProductDescriptionForm : Form
   {
     public ProductDescriptionForm()
    {
        InitializeComponent();
    }

    public Image picture
    {
        get { return pictureBox1.Image; } 
        set { pictureBox1.Image = value; }
    }


}

how do i transfer other values in the same row that has the image to another form

I am using winforms….

many thanks in advance….

do i need to change the cell click event to row click event ?????

if so , how do i check the particular cell with image in datagridview

would any suggestions any bit of code would be helpful to me

  • 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-25T16:43:08+00:00Added an answer on May 25, 2026 at 4:43 pm

    I have solved My problem by using the following way

    int selectedrowindex= productgridview.SelectedCells[0].RowIndex;
    DataGridViewRow selectedRow = productgridview.Rows[selectedrowindex];
    string desc = Convert.ToString(selectedRow.Cells["productdescr"].Value);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have done something like this: <form action=validate.php method=get> Id :<input type=text name=pID/><br/><br/> Name
I would like to connect to a FTP from Java. I have done this:
In a previous life, I might have done something like this: <a href=# onclick=f(311);return
I'm designing a game server and I have never done anything like this before.
Most of my development life, I have done a JavaScript generated button like so:
I feel like GUID/UUID questions have been done to death here, but I can't
I have never done any Windows coding and I would like to give it
I would like to track how many surveys have been done by different departments
I have tried what seems like everything - I've done similiar things many times
I've done enough Googling to know that if I have something like class SubObject

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.