How can I apply horizontal and vertical scroll bars to a mvc razor grid by keeping the column widths as fixed?
1 Answer, 1 is accepted
answered on 09 Apr 2012, 10:01 AM
First of all, I suppose you have already enabled scrolling via Scrollable(), as in our online demos.
In order to get a vertical scrollbar, you need to set an appropriate height to the scrollable data area in the Scrolling() settings:
.Scrollable(scrolling => scrolling.Height(250))
The default height is 200 px.
In order to get a horizontal scrollbar, you need to set explicit pixel widths to all columns, so that their cumulative width exceeds the Grid width. You can alternatively set width style to the Grid table via TableHtmlAttributes() - either a pixel value, or a perventage value larger than 100%.
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.