Skip to content

Commit 4508fb1

Browse files
DataGrid: add info about sticky headers (DevExpress#6912)
1 parent 253701c commit 4508fb1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

concepts/05 UI Components/DataGrid/15 Columns/15 Customize Column Headers.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,19 @@ If you need a more specific customization, define a custom template in the **col
226226

227227
---
228228

229+
DataGrid column headers are attached to columns. To make headers fixed/sticky during page scrolling, adjust the DataGrid's stylesheet. Add the following attributes to the `.dx-datagrid-headers` CSS class:
230+
231+
<!--CSS-->
232+
.dx-datagrid .dx-datagrid-headers{
233+
position: sticky;
234+
top: 0;
235+
z-index: 1000;
236+
}
237+
238+
#include btn-open-github with {
239+
href: "https://github.com/DevExpress-Examples/devextreme-datagrid-sticky-headers"
240+
}
241+
229242
To hide column headers, assign **false** to the [showColumnHeaders](/api-reference/10%20UI%20Components/GridBase/1%20Configuration/showColumnHeaders.md '/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/#showColumnHeaders') property.
230243

231244
---

0 commit comments

Comments
 (0)