New to Kendo UI for jQuery? Download free 30-day trial

Hide the Vertical Scrollbar


Product Progress® Kendo UI® Grid for jQuery
Operating System All
Browser All
Browser Version All


How can I hide the vertical scrollbar when you do not need it in the Kendo UI Grid for jQuery?


The following example demonstrates how to conditionally hide the vertical scrollbar of the Kendo UI Grid, when the total height of all table rows is less than the Grid height.

.no-scrollbar .k-grid-header
padding: 0 !important;

.no-scrollbar .k-grid-content
overflow-y: visible;

<p>Use the Grid pager to go to the last page and see the scrollbar being hidden programmatically.</p>
<div id="grid"></div>


$(function () {
    function toggleScrollbar(e) {
        var gridWrapper = e.sender.wrapper;
        var gridDataTable = e.sender.table;
        var gridDataArea = gridDataTable.closest(".k-grid-content");

        gridWrapper.toggleClass("no-scrollbar", gridDataTable[0].offsetHeight < gridDataArea[0].offsetHeight);

        dataSource: {
            type: "odata",
            transport: {
                read: "//"
            schema: {
                model: {
                    fields: {
                        OrderID: { type: "number" },
                        Freight: { type: "number" },
                        ShipName: { type: "string" },
                        OrderDate: { type: "date" },
                        ShipCity: { type: "string" }
            pageSize: 20,
            serverPaging: true,
            serverFiltering: true,
            serverSorting: true
        height: 700,
        dataBound: toggleScrollbar,
        filterable: true,
        sortable: true,
        pageable: true,
        columns: [{
            field: "OrderID",
            filterable: false
                        field: "OrderDate",
                        title: "Order Date",
                        format: "{0:MM/dd/yyyy}"
                    }, {
                        field: "ShipName",
                        title: "Ship Name"
                    }, {
                        field: "ShipCity",
                        title: "Ship City"


See Also

In this article