1 Answer, 1 is accepted
0
Accepted
Hi Lamkhoa,
If you want the RadGrid control to expand vertically, depending on the number of its rows, you can use the following CSS rule:
.MyGridClass .rgDataDiv
{
height : auto !important ;
}
"MyGridClass" is some custom CSS class to the RadGrid control, that you should set to prevent the CSS rule be applied to all RadGrid instances on the page / website.
Greetings,
Pavlina
the Telerik team
If you want the RadGrid control to expand vertically, depending on the number of its rows, you can use the following CSS rule:
.MyGridClass .rgDataDiv
{
height : auto !important ;
}
"MyGridClass" is some custom CSS class to the RadGrid control, that you should set to prevent the CSS rule be applied to all RadGrid instances on the page / website.
Greetings,
Pavlina
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.
Daniel Aquere
commented on 26 Nov 2011, 07:08 PM
Top achievements
Rank 2
Hi Pavlina,
Very good your suggestion.
Please, how can I use UseStaticHeaders="true" together with your suggestion? I tried, but, doesn´t works.
Thanks, best
Daniel
Very good your suggestion.
Please, how can I use UseStaticHeaders="true" together with your suggestion? I tried, but, doesn´t works.
Thanks, best
Daniel
Pavlina
commented on 28 Nov 2011, 11:01 AM
Telerik team
Hello Daniel Aquere,
Please examine the help article below and let me know if it works for you:
http://www.telerik.com/help/aspnet-ajax/grid-change-scroll-height-at-runtime.html
Regards,
Pavlina
the Telerik team
Please examine the help article below and let me know if it works for you:
http://www.telerik.com/help/aspnet-ajax/grid-change-scroll-height-at-runtime.html
Regards,
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
KidSysco
commented on 29 May 2014, 07:38 PM
Top achievements
Rank 1
I would like to know why this happens. I need to apply this fix only on some radgrids in order to get them to work in Chrome. Can we get some more info on this?
Pavlina
commented on 03 Jun 2014, 03:16 PM
Telerik team
Hi Ryan,
When scrolling with static headers are enabled grid ScrollHeight property(the height of the control's scrollable area) is set to 300px by default. This fixed height does not allow the grid to auto resize, when the data can not fill the scroll height. However, you can use the client-side GridCreated event to check whether the table height is less than the value of the ClientSettings.Scrolling.ScrollHeight property, and if so, explicitly modify the scroll area height to match the height of the data items as shown in the following article:
http://www.telerik.com/help/aspnet-ajax/grid-resize-grid-with-scrolling-when-less-data.html
I hope this information helps to understand why this happens.
Regards,
Pavlina
Telerik
When scrolling with static headers are enabled grid ScrollHeight property(the height of the control's scrollable area) is set to 300px by default. This fixed height does not allow the grid to auto resize, when the data can not fill the scroll height. However, you can use the client-side GridCreated event to check whether the table height is less than the value of the ClientSettings.Scrolling.ScrollHeight property, and if so, explicitly modify the scroll area height to match the height of the data items as shown in the following article:
http://www.telerik.com/help/aspnet-ajax/grid-resize-grid-with-scrolling-when-less-data.html
I hope this information helps to understand why this happens.
Regards,
Pavlina
Telerik
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.
Kundan
commented on 19 May 2017, 05:48 AM
Top achievements
Rank 1
<ClientSettings>
<Scrolling AllowScroll="true" FrozenColumnsCount="2" />
<Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />
</ClientSettings>
<Scrolling AllowScroll="true" FrozenColumnsCount="2" />
<Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />
</ClientSettings>
Timothy
commented on 22 Nov 2017, 07:21 PM
Top achievements
Rank 1
Setting CSS worked for me. Thanks!