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

kendo grid vertical scrollbar not appearing after 10 rows

5 Answers 2908 Views
Grid
This is a migrated thread and some comments may be shown as answers.
deshini
Top achievements
Rank 1
deshini asked on 12 Jul 2016, 11:26 AM
i have a kendo grid for data entry app which adds rows to the bottom. i want the vertical scroll bar to appear after 10 rows. i do not want to set a height initially to the grid.

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 12 Jul 2016, 02:19 PM
Hi,

As pointed in the help article below to achieve vertical scrolling, the Grid must have a set height:
http://docs.telerik.com/kendo-ui/controls/data-management/grid/walkthrough#scrolling 

Otherwise, it will expand vertically to show all rows.

Regards,
Pavlina
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
deshini
Top achievements
Rank 1
answered on 13 Jul 2016, 03:40 AM
Pavlina, i can not set height to this grid because it initially has one row. rows are added when user enters data to the grid. if i set a height to the grid at the beginning it causes empty space in the interface. i need my scroll bar to appear when user has entered at least 10 rows. is there a way to set height when the grid reaches 10 rows ?? is there a way to set a class to the grid using databound function when the grid have 10 data rows ??
0
Pavlina
Telerik team
answered on 13 Jul 2016, 11:35 AM
Hi,

The article below 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.
http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Layout/hide-scrollbar-when-not-needed

Give it a try and let me know if it helps to achieve your goal.

Regards,
Pavlina
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
deshini
Top achievements
Rank 1
answered on 14 Jul 2016, 04:04 AM

thanks pavlina, i achieved my desired output using this small CSS.

/**     add  payments grid height */

#dgAddPaymentsEnterId .k-grid-content{ 
   min-height: 0px;
   max-height: 310px !important;
}

0
Pavlina
Telerik team
answered on 14 Jul 2016, 11:13 AM
Hi,

I am glad to hear you managed to achieve your goal. Do not hesitate to contact us in case further questions arise.

Regards,
Pavlina
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
deshini
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
deshini
Top achievements
Rank 1
Share this question
or