How to make scrollbar auto enabled or disabled in a Kendo grid?

Viewed 30449

This is my code for creating the grid:

@{
    if (Model.GenericEntityList.Count > 0)
    {
        @(Html.Kendo().Grid(Model.GenericEntityList).Name(screenNames.ToString()).Columns(
              columns =>
                  {
                      columns.Bound(a => a.ID).Title("<input id='checkAll' type='checkbox' />").ClientTemplate("<input type='checkbox' id=#=genericCheckbox(ID,ViewFlag)#").Width(7);
                      columns.Bound(a => a.Name).Title(screen.ToString() + " Name").Width(93);
                  }
              ).Selectable().Scrollable().DataSource(
                  datasource =>
                  datasource.Ajax().Read(read => read.Action("CompSetHide", "Compset"))
              ).Events(a => a.Change("rowclick")
              )
              .HtmlAttributes(new {style = "height: 185px;"}) 
              )
    }
}

How can I disable and enable the vertical scrollbar that appears inside the kendo grid automatically?

5 Answers

Use the k-scrollable attribute

<kendo-grid k-scrollable="false" ... />

If you are using a kendo grid with nested kendo grid in each row and scrolling virtual.(using angular 5) case 1: After expand the and scroll the skip take last count.

sol: use [detailRowHeight] = "36" in parent grid

Related