Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by josephtan2k on Nov 18, 2007 21:21
open dhtmlx forum
scroll bars

hi again..

i have a problem with the behavior of the scroll bars..
example when i have a horizontal scroll bar and the size of a cell is bigger than what the grid can show..
when i click the cell the scroll bar always moves to the right..how can i make it stationary instead?

tnx in advance..
Answer posted on Nov 19, 2007 02:10
By default grid automatically scrolls to show cell in focus, you can change behavior by next code modification

dhtmlxgrid.js, line 1180

    this.moveToVisible = function(cell_obj,onlyVScroll){

can be replaced with

    this.moveToVisible = function(cell_obj,onlyVScroll){
       onlyVScroll=true;

after such modification only vertical autoscrolling will be applied ( more tricky way - you can to adjust scrollLeft position calculation according you needs in same function )