This is a migrated thread and some comments may be shown as answers.

grid scrolllintoview

1 Answer 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 03 Feb 2011, 06:56 PM
I have a grid and I select an item clientside after binding. I wish to scroll to the selected item. The documentation I have found on the telerik site references row.Control.scrollIntoView which is not (or is no longer) a valid construct.

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 04 Feb 2011, 03:24 PM
Hi Albert,

If you are using scrollable RadGrid, then please check this help article.

And if you want to change the scroll of your browser window, then you can use this function:

function ScrollToElement(theElement) {
  var selectedPosX = 0;
  var selectedPosY = 0;
  while (theElement != null) {
    selectedPosX += theElement.offsetLeft;
    selectedPosY += theElement.offsetTop;
    theElement = theElement.offsetParent;
  }
  window.scrollTo(selectedPosX, selectedPosY);
}
Can this function like: ScrollToElement(row); when you want to scroll to the row.

Kind regards,
Vasil
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Vasil
Telerik team
Share this question
or