3.0.0

Scrolling Grid Offset Way Out

In both the online demos that are posted, aswell as my own experimentation, if the grid has scrollbars and you scroll down the grid, this method isn't offsetting the edit input boxes properly. The div containing the input boxes is just being offset by a static number based on cellheight, but not factoring in scroll in any way. Does anyone have any idea how to resolve this?

This can be tested easilly with the online demo by just shrinking your window smaller until a scrollbar appears on the grid, and then moving the scrollbar down. Now double click on a cell to get the edit row.
Chad
February 8,
I have just tried editing (editing.htm demo in the examples/new directory) in both IE 6 and FF 1.5 and it is working great in both. What browser are you testing in? What OS are you running?
Jim Hunter (www.FriendsOfAW.com)
February 8,
After some messing around for a bit I solved my problem...

edit.js -> somewhere at top of prepareEdit()
############################
var scrollbars = gridasGridObj.getTemplate("layout").getContent("scrollbars");
############################

Then anytime you see style.top use...
############################
nX.style.top = (_absTop(obj) + corrector) - scrollbars.element().scrollTop + "px";
############################

Chad
Chad
February 8,
Chad, are you setting your width and heigth with setSize() and for the positition using setPostition()? And are you using absolute sizes or percentages for your settings? The reason I ask is because I still can't reproduce your conditions and the solution you show might be linked to a pseudo-bug that I found a while ago. And if I know more about your environment then I might be able to decipher this better.

Thanks
Jim Hunter (www.FriendsOfAW.com)
February 8,
I'm using XP w/ IE 6.

I can reproduce the problem even using the online demo on this website.
Chad
February 8,
Sorry, I didn't answer part of your question... I am now using this, and it's working.

var scrollbars = gridasGridObj.getTemplate("layout").getContent("scrollbars");
nX.style.top = (_absTop(obj) + corrector) - scrollbars.element().scrollTop + 1 + "px";
nX.style.left = _absLeft(obj) + "px";
nX.style.width = obj.offsetWidth;
nX.style.height = obj.offsetHeight;
Chad
February 8,
Chad, I must apologize. I saw that the version number reported by the forum was 2.0 but when I backed out of this thread and got to the page that I think you are referring to (the demo), it is version 1.0. All the testing I was doing was for 2.0 and the editing in 2.0 is much cleaner then the 1.0 edit template that was created. Sorry for being confused. Now I know why I wasn't able to duplicate your issue.
Glad you found the answer instead of waiting on me, I would never have figured it out working on the wrong version. ;)
Jim Hunter (www.FriendsOfAW.com)
February 8,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.