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

Horizontal Scrolling Only?

1 Answer 254 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 05 Jan 2021, 07:52 PM
In a grid, is there any way to turn off vertical scrolling (so that the scrollbar doesn't appear), but still keep horizontal scrolling enabled?

1 Answer, 1 is accepted

Sort by
0
Hetali
Telerik team
answered on 06 Jan 2021, 12:22 AM

Hello Paul,

In order to keep the horizontal scroll in the Kendo UI Grid and remove the vertical scroll, please set the pageSize of the Grid such that it does not exceed the height of the Grid. Similarly, set the width of the ColumnComponent such that it exceeds the width of the Grid. For example:

<kendo-grid [pageSize]="5" [height]="460" style="width: 500px;">
  <kendo-grid-column field="Id" [width]="100">
  </kendo-grid-column>
  <kendo-grid-column field="CompanyName" [width]="200">
  </kendo-grid-column>
  <kendo-grid-column field="ContactName" [width]="150">
  </kendo-grid-column>
  <kendo-grid-column field="Address" [width]="150">
  </kendo-grid-column>
</kendo-grid>

In this StackBlitz example, the Kendo UI Grid only has a horizontal scroll.

I hope this helps. Please let me know if I can further assist you.

Regards,
Hetali
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Answers by
Hetali
Telerik team
Share this question
or