Absolute position of a row?
Is it possible to get the absolute left,top position of a grid row?
Karl Thoroddsen
September 11,
var ypos = 0;
var gridrow = itsGrid.getRowTemplate(row).element();
while (gridrow != null)
{
ypos += gridrow.offsetTop;
gridrow = gridrow.offsetParent;
}
AW.getLeft = function(element){
return element.getBoundingClientRect().left;
};
AW.getTop = function(element){
return element.getBoundingClientRect().top;
};
AW.getLeft = function(element){
var doc = document.getBoxObjectFor(document.body);
return document.getBoxObjectFor(element).screenX - doc.screenX + doc.x;
};
AW.getTop = function(element){
var doc = document.getBoxObjectFor(document.body);
return document.getBoxObjectFor(element).screenY - doc.screenY + doc.y;
};
This topic is archived.
ActiveWidgets is a javascript library for creating user interfaces. It offers excellent performance for complex screens while staying simple, compact and easy to learn. Deployed by thousands of commercial customers in more than 70 countries worldwide.
Copyright © ActiveWidgets 2021