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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:18:49+00:00 2026-05-13T17:18:49+00:00

I have a grid with 100 columns and 100 rows. I want to draw

  • 0

I have a grid with 100 columns and 100 rows. I want to draw a line between the centre of one of those grid squares and another, say 45,25 to 75,38.

I am happy with being able to draw a line, but how can i find the x and y pos of the centre of the two grid squares? Or is there a better approach i have missed

  • 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-13T17:18:49+00:00Added an answer on May 13, 2026 at 5:18 pm

    Your presentation should work with the grid you define. It seems the issue is that the representation of the thing you are trying to join is not centred on the grid location you specified. Your line should be drawn from 45,25 to 75,38. If that appears to not draw from the centres, then the things drawn at 45,25 and 75,38 are not drawn on the centre of the grid location.

    If your display is grid based, then finding the centre of the screen grid from your theoretical 45,25 location would be something along these lines:

    screenXcentre = ((xPos-1)*CellWidth)-(CellWidth/2);
    screenYcentre = ((yPos-1)*CellHeight)-(CellHeight/2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a two-dimensional grid data with 10 columns and 100 rows and I
I have grid something like this: Ext.define('Exp.view.dashboard.Tv', { extend: 'Ext.grid.Panel', initComponent: function() { this.columns
i have data-grid in my application and i want to customize my data-grid so
I have a grid where first 2 columns are bound with ForeignKey (Category and
I have a grid with some controls inside. I want to hide the grid
I have a grid similar to the below one, mine has a few more
I have this grid.. <tr> <td class=TDCaption style=text-align: <div class=DivStyleWithScroll style=width: 100%; overflow: scroll;
I have a grid that I want to show depending on the result of
I have the following code where the image is higher than 44px: <div style=width:300px;display:-ms-grid;-ms-grid-rows:44px
I have the follow line in my code HtmlControl divstatus = (HtmlControl)GridView1.Rows[j].FindControl(divstatus); and in

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.