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

Horizontal and Vertical scroll bars

1 Answer 158 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Narayanarao
Top achievements
Rank 1
Narayanarao asked on 07 Apr 2012, 06:42 AM

Hi Team,

    How can I apply horizontal and vertical scroll bars to a mvc razor grid by keeping the column widths as fixed?

Regards,

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 09 Apr 2012, 10:01 AM
Hi Narayanarao,

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%.

Greetings,
Dimo
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.
Tags
Grid
Asked by
Narayanarao
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or