The Datagrid2 has a sticky header in the standard setup
The following SCSS solved the problem.
.sticky-header-datagrid2 .table .th {
position: sticky;
top: 0px;
z-index: 100;
}
.sticky-header-datagrid2 .widget-datagrid-content {
overflow-y: unset;
}
Hi Sweety Kumari ,
Kindly go through this
To make Header or column of right ,left side sticky Use Widget “mDatagrids”.(For Datagrid 2)
Sticky Columns: Allows you to make the first and/or last column sticky while scrolling. Note: Fixed column sizes are required for this feature.
Sticky Header: Keeps the header visible while scrolling.
Display Full Content: Enables displaying the full content/text of a column, with options to limit the amount of content/text to a maximum number of lines.
Compact View: Makes the grid compact.
Column Width Settings: Provides options to set minimal widths for columns, including sticky columns.
Installation and Configuration
Download widget from Marketplace.
Press F4 within Mendix Studio Pro to access the Data Grid options within your appearance tab.(Once you are through with this step it will be automatically get applied to all the datagrid 2 in the project )
In the appearance tab, configure the sticky columns as per your requirements.