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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:09:21+00:00 2026-05-22T19:09:21+00:00

I want to know how to check whether a gridview’s row got selected or

  • 0

I want to know how to check whether a gridview’s row got selected or not.
I am working on windows application.

I want to put a if condition ie if a particular row gets selected then fill the textbox with the correspoding cell value.

I am just not getting the way how to give the condition in the if clause.

  • 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-22T19:09:22+00:00Added an answer on May 22, 2026 at 7:09 pm

    Handle the DataGridView.SelectionChanged event. Use the DataGridView.SelectedRows property to get the selected rows collection.

    private void dataGridView_SelectionChanged(object sender, EventArgs e)
    {
        // Update the text of TextBox controls.
        textBox1.Text = dataGridView.SelectedRows[0].Cells[1].Value.ToString();
        textBox2.Text = dataGridView.SelectedRows[0].Cells[2].Value.ToString();
        ....
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to check my server connection to know if its available or not
I want to know the Query to check whether the particular Record in the
I want to know whether FindSystemTimeZoneByID will check the client system timezone or will
I want to know if i can create a custom google maps application,on which
i want to know how to edit a single row (which i select) from
I want to check whether iPhone is in a particular region and the region
i want to validate for listBox whether list box is empty of or not
I want to know whether a given record is present in a database or
I want to check whether a website is up or down at a particular
Basically I want to check whether a cell in a UITableView has been loaded/viewed

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.