0

Sync two Grids based on vertical scrollbar

asked 2015-01-06 16:17:47 +0800

andij62 gravatar image andij62
315 1 7

Hi all,

i have two Grids and i will sync the second grid based on the first grid. Both Grids have the same number of rows. When i scroll the first grid vertical then the second grid automatically scroll to the same position. Is this possible?

Regards Andy

delete flag offensive retag edit

Comments

andij62 is it possible to work with paging?

chillworld ( 2015-01-09 12:35:52 +0800 )edit

6 Answers

Sort by ยป oldest newest most voted
2

answered 2015-01-12 01:48:58 +0800

vincentjian gravatar image vincentjian
2245 6

updated 2015-01-12 01:49:56 +0800

Hi Andy,

It is possible to sync two grids on vertical scrollbar. You can listen onScroll event on second grid and sync the scrollTop value of first grid.

Refer to the sample on zkfiddle.

link publish delete flag offensive edit
0

answered 2015-01-09 12:25:25 +0800

Darksu gravatar image Darksu
1991 1 4

Hello andij62,

I have never seen the behavior that you describe.

Could you please post your configuration details, test environment, as well as a code sample so that i can check it out in detail?

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2015-01-09 16:08:12 +0800

andij62 gravatar image andij62
315 1 7

Hello Darksu,

after problems with Grids with fixed cols on the mac and iPad (Safari and Firefox don't scroll horizontal by fixed cols) i had the idea 2 grids display side by side. One Grid shows Date and Time and the other Grid the Data. If the Data-Grid scrolls horizontally the Date and Time Grid is always visible. The Problem is when the Data-Grid scrolls vertical, the Date and Time Grid must also scroll vertical in the same distance but automatically.

I do not know if my idea is good and how I could make it.

Regards Andy

link publish delete flag offensive edit
0

answered 2015-01-13 18:11:44 +0800

andij62 gravatar image andij62
315 1 7

Hi vincentjian,

super it works perfect and my Problem is solved!

Many Thanks.

Regards Andy

link publish delete flag offensive edit
0

answered 2015-01-18 21:03:41 +0800

andij62 gravatar image andij62
315 1 7

Hi,

i use rowRenderer in java to render the Grid. How can i detect in jave whether a vertical scrollbar is shown and how can i increase the height of the last Row about the scrollbarwidth?

Regards Andi

link publish delete flag offensive edit
0

answered 2015-01-18 21:16:17 +0800

Darksu gravatar image Darksu
1991 1 4

Hello andij62,

Based on the following url you could apply the same method for a grid and adjust it accordingly.

http://stackoverflow.com/questions/2146874/detect-if-a-page-has-a-vertical-scrollbar

Best Regards,

Darksu

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-01-06 16:17:47 +0800

Seen: 37 times

Last updated: Jan 18 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More