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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:48:43+00:00 2026-05-22T00:48:43+00:00

Given a specific row number and column index how can I calculate the cell

  • 0

Given a specific row number and column index how can I calculate the cell location (IE: Location.Point) inside a DataGridView?

The reason I need the location of the cell is so I can position a button inside the cell to allow for folder browsing (the datagridview shows folderpaths).

Alternative suggestions about how to accomplish this welcome.

  • 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-22T00:48:43+00:00Added an answer on May 22, 2026 at 12:48 am

    You can’t really find a point for a DGV cell because cells occupy a rectangular area in a DGV. However, you can find this area by using the DataGridView.GetCellDisplayRectangle() method. It returns a Rectangle for the display area of a DGV Cell given by the Cell’s column and row indices. If you really want a point you can easily use the Rectangle to construct Points for any of the Rectangle‘s four corners.

    // Get Rectangle for second column in second row.
    var cellRectangle = dataGridView1.GetCellDisplayRectangle(1, 1, true);
    // Can create Points using the Rectangle if you want.
    Console.WriteLine("Top Left     x:{0}\t y:{1}", cellRectangle.Left, cellRectangle.Top);
    Console.WriteLine("Bottom Right x:{0}\t y:{1}", cellRectangle.Right, cellRectangle.Bottom);
    

    But I agree with your question’s commenters; it would be better to create a custom DataGridViewColumn and host your TextBox and Button there. Here’s an example of doing this for the DateTimePicker control:

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to draw a circle onto a bitmap in a specific colour given
I want to calculate number of used columns for each row in excel 2007
So say I have a node structure like: <Row> <Column Name=Primary Number>1</Column> <Column Name=Secondary
I have a table. The row is given specific height and overflow is set
How do you find number of items in a column inside a grid? I
Given a specific DateTime value, how do I display relative time, like: 2 hours
I have an array of ints like this: [32,128,1024,2048,4096] Given a specific value, I
When displaying all articles of a specific month (given through the urls like this
Given that the tasks in a specific sprint will not divide perfectly into the
Given that two branches have diverged and a specific commit from one branch (and

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.