Can we have a sticky header with page scroll

1 Answer 170 Views
Accessibility Grid GridLayout PivotGrid Template Window
Kunal
Top achievements
Rank 1
Kunal asked on 28 Sep 2023, 06:06 PM

Hi

Can we achieve sticky header on the grid with page scroll instead of having a scrollbar within a grid.

If you refer to any example: https://demos.telerik.com/aspnet-core/grid they have one scrollbar for grid n one for page. Can we eliminate grid n display all data rows n have a sticky header as we goes down?

1 Answer, 1 is accepted

Sort by
0
Vasko
Telerik team
answered on 03 Oct 2023, 01:18 PM

Hi Kunal,

To achieve this, you can manipulate the position of the Grid header with the following CSS rules: 

<style>
    .k-grid-header { 
        position: sticky;
        top: 0;
    }
</style>

Kind regards,
Vasko
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.
Tags
Accessibility Grid GridLayout PivotGrid Template Window
Asked by
Kunal
Top achievements
Rank 1
Answers by
Vasko
Telerik team
Share this question
or