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

Vertical scroll bar appearing on page load when UseStaticHeaders="true''

4 Answers 208 Views
Grid
This is a migrated thread and some comments may be shown as answers.
unnati
Top achievements
Rank 1
unnati asked on 03 Nov 2011, 04:13 PM
I have a Radgrid which is used in a SharePoint page. There is also a possibility that multiple Telerik grids can be used on a single SharePoint page.
The requirement is to freeze the headers on scroll.
For this i used, AllowScroll=true and UseStaticHeaders=true.
I fixed the width of all columns also because there was a misalignment between headers and data.
Now the issue that I am facing is: A vertical scroll bar appears on page load even though the size of the data is smaller than the Radgrid's height. This is not expected because data height is less and hence, the scroll bar should not appear.

Is there any possible solution to display the vertical scroll bar only if the data height is greater than the Radgrid height, considering the possibility of multiple grids on a single SharePoint page?

4 Answers, 1 is accepted

Sort by
0
unnati
Top achievements
Rank 1
answered on 07 Nov 2011, 04:51 AM
Is there any update on the issue?
0
Pavlina
Telerik team
answered on 07 Nov 2011, 10:43 AM
Hello Unnati,

To avoid the appearance of the vertical scroll, you should make sure that the height of the records in the grid does not exceed the ClientSettings -> Scrolling -> ScrollHeight scroll setting, not the grid's height. Refer to the help article below for more information about Height vs. ScrollHeight:
http://www.telerik.com/help/aspnet-ajax/grid-height-vs-scrollheight.html

All the best,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
unnati
Top achievements
Rank 1
answered on 07 Nov 2011, 11:35 AM
Hello 

I have not set the Grid Height or Scroll Height.
I have only set the height of the web part.
Also the data is coming dynamically. Then how is it possible to set the height of the records so that it does not exceed Scroll Height?
0
Jayesh Goyani
Top achievements
Rank 2
answered on 07 Nov 2011, 12:57 PM
Hello,

try with below code snippet.
<style type="text/css">
 
       .RadGrid .rgDataDiv
       {
           height : 100% !important;
           max-height : 300px !important;
       }
        
   </style>

let me know if any concern.

Thanks,
Jayesh Goyani
Tags
Grid
Asked by
unnati
Top achievements
Rank 1
Answers by
unnati
Top achievements
Rank 1
Pavlina
Telerik team
Jayesh Goyani
Top achievements
Rank 2
Share this question
or