RealGrid2 가이드
이벤트 🆕
스크롤 동기화 🆕

그리드 스크롤 동기화

가로, 세로 스크롤을 동기화 시켜 여러 그리드를 동시에 스크롤 이동이 가능합니다.

그리드 상단 행 변경 시 onTopIndexChanged 이벤트를 사용하며 가로 스크롤 이동 시 onLeftPosChanged 이벤트 내부에서 동기화를 원하는 그리드의 스크롤을 함수로 이동시킵니다.

masterGrid.onTopIndexChanged = function (grid, idx) {
     detailGrid.setTopItem(idx);
}
 
detailGrid.onTopIndexChanged = function (grid, idx) {
     masterGrid.setTopItem(idx);
}
 
masterGrid.onLeftPosChanged = function (grid, pos) {
     detailGrid.setLeftPos(pos);
}
 
detailGrid.onLeftPosChanged = function (grid, pos) {
     masterGrid.setLeftPos(pos);
}