Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo Grid - Maintain headings when scrolling vertically

I have a kendo grid (version 2012.3.1114) that displays quite a bit of data.

The grid scrolls vertically and does not page, as this is a requirement we have.

Is there any way that the grid can maintain it's headings visible as the user scrolls down? I'm looking for something similar to how Excel behaves when you select the "Freeze Top Row" option.

like image 473
Matei Avatar asked Mar 05 '13 08:03

Matei


1 Answers

Define the height of the table body as follow

$("#grid").kendoGrid({
    dataSource: datasource,
    pageable  : false,
    height:     300,
    columns   : [
        ...
    ]
});

NOTE: The height is the height in pixels of the body of the table (does not include header or footer).

like image 112
OnaBai Avatar answered Nov 15 '22 01:11

OnaBai