hide page scroll when focus is on Radgrid

Thread is closed for posting
2 posts, 0 answers
  1. Kishor
    Kishor avatar
    84 posts
    Member since:
    Oct 2012

    Posted 18 Sep 2014 Link to this post


    I have webpart containing radgrid with scroll.
    when i scroll grid , page also scroll

    so i want to do is - hide disable or hide page scroll when focus is on radgrid and enable scroll when focus is out of radgrid

    below is attached image

    please help.

  2. Pavlina
    Pavlina avatar
    6187 posts

    Posted 23 Sep 2014 Link to this post

    Hello Kishor,

    The only when to hide the browser scroll while scrolling the grid is by handling Grid OnScroll client-side event and use the Javascript code snippet below:
    <script type="text/javascript">
            var a = 0;
            function OnScroll(sender, args) {
                document.documentElement.style.overflow = "hidden";
                a = setTimeout(function () {
                    document.documentElement.style.overflow = "";
                }, 1000);

    I have also attached a sample project for reference.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top