3.0 beta 2

Scroll Into View scrollbars not defined errors

When trying to implement the following function (or other examples like it found in the forums) get the following error

scrollbars has no properties
[Break on this error] var x = scrollbars.element().scrollLeft;

Any assistance would be appreciated
June 27,
I guess it would help if I provided the function...

var _refresh = obj.refresh;
obj.refresh = function(){
var scrollbars = this.getTemplate("layout").getContent("scrollbars");
var x = scrollbars.element().scrollLeft;
var y = scrollbars.element().scrollTop;
var data = this.getTemplate("layout").getContent("data");
var data_x = data.element().scrollLeft;
var data_y = data.element().scrollTop;
var top = this.getTemplate("layout").getContent("top");
var top_x = top.element().scrollLeft;
var top_y = top.element().scrollTop;
this.element().runtimeStyle.visibility = "hidden";
var _obj = this;
scrollbars.element().scrollLeft = x;
scrollbars.element().scrollTop = y;
data.element().scrollLeft = data_x;
data.element().scrollTop = data_y;
top.element().scrollLeft = top_x;
top.element().scrollTop = top_y;
_obj.element().runtimeStyle.visibility = "visible";
}, 0 );

This function was copied directly from the forums
June 30,
Paul, this code seems to be from version 1 and I guess you are actually using version 2. If so, you need to calculate scroll offset using the row height and row position and then call grid.setScrollTop().
Alex (ActiveWidgets)
June 30,
Thanks Alex...yes, I am using ver 2 and doing cell level editing in a backend file and returning the values as an xml file. Can you point me in the direction of an example...if you know of one...using the grid.setScrollTop() upon return from an AJAX call in the obj.onCellValidated () function...here is my current rendition:

obj.onCellValidated = function(text, column, row){

var r = new AW.HTTP.Request;
r.setParameter("column", column);
r.setParameter("row", row);
r.setParameter("text", text);
r.setParameter("ajaxMode", 'cellUpdate');
r.setParameter("xmlFile", '<? echo $_REQUEST[xmlFile]; ?>');

r.response = function(data){

if (data.indexOf('NOTICE') !=-1){


var d = new Date();
table.setURL("/xmlFiles/<? echo $_REQUEST['xmlFile']; ?>?"+d.getTime());

June 30,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.