×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

move the same row of two different grids with click and scroll vpf6

move the same row of two different grids with click and scroll vpf6

move the same row of two different grids with click and scroll vpf6

(OP)
I can move the same row of two different grids that use the same cursor as recordsource after clicking on any column of the grid pc and using the keyboard

grid pc1 procedure afterrowcolchange

LOCAL lcAlias
lcAlias = ALIAS()

SELECT(this.recordsource)
SKIP
IF EOF()
GO BOTTOM
ENDIF

IF NOT EMPTY( lcAlias )
SELECT( lcAlias )
ELSE
SELECT 0
ENDIF

thisform.pc.setfocus()

grid pc procedure afterrowcolchange

LOCAL lcAlias
lcAlias = ALIAS()

SELECT(this.recordsource)
SKIP
IF EOF()
GO BOTTOM
ENDIF

IF NOT EMPTY( lcAlias )
SELECT( lcAlias )
ELSE
SELECT 0
ENDIF

Thisform.pc1.Columns(1).SetFocus()
thisform.pc1.setfocus()

How do I move the same row of two different grids when I use the mouse, when I click on it the same row is selected and when I use the scroll the two grids are moved?

RE: move the same row of two different grids with click and scroll vpf6

Take a look at the Scrolled() event and the DoScroll() method. Basically you would call DoScroll() for the opposite grid in the grid that is being scrolled via the Scrolled() event. In the event AfterRowColChange() for both grids, move the record pointer for the other grid and then do a OtherGrid.Refresh().

Greg

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close