PDA

View Full Version : [FIXED] Horizontal scrolling problem with GridEditor



tamcy
24 Oct 2007, 3:59 AM
Hi,

In response to my thead (http://extjs.com/forum/showthread.php?t=16137) in the help forum, I found that the locked column is not taken into consideration when determining the need for a horizontal scroll. Just for some hint (I have to admit that this is my first time to play with extjs code and will probably miss something :">), I add the following snippet to Ext.grid.Gridview -> ensureVisible() method:



// calculate width of locked columns
var lockedWidth = 0;
var _count = cm.getColumnCount();
var _col = 0;
while(_col < _count) {
var _c = cm.getColumnById(cm.getColumnId(_col));
if (_c.locked)
lockedWidth += cm.getColumnWidth(_col);
else
break;
_col++;
}


And in the same function, change the following two line:


var sbot = stop + ch;
// var sright = sleft + c.clientWidth;
var sright = sleft + c.clientWidth - lockedWidth;




}else if(cright > sright){
// c.scrollLeft = cright-c.clientWidth;
c.scrollLeft = cright-c.clientWidth+lockedWidth;


This solves my problem when scrolling horizontally with arrow keys.

Thanks for you attention :)

KevinChristensen
2 Nov 2007, 5:00 AM
Is there any update on getting the horizontal scrolling fixed in the 2.0 release? I had to revert back to Ext 1.1.1 and will stay there until a release which includes the fix is available for both the GridPanel and EditorGridPanel. I applied the above changes, which work, but do not address the problem with an EditorGridPanel. The EditorGrid from 1.1.1 works great.

mystix
2 Nov 2007, 9:13 AM
hmmm... you might want to post this in the 2.0 bug forum / update the relevant 2.0 bug thread instead, since the team is focused on getting 2.0 out the door now. 1.1.1 is on the backburner for now (note: it's not being ignored though... i'm still perusing the forums ;)).

brian.moeskau
18 Dec 2007, 1:04 AM
Fixed in SVN per this thread (http://extjs.com/forum/showthread.php?p=100109#post100109).