Freeze headers of the DataGrid

0
Hello All, I have a DataGrid with a scroll view. I’m trying to freeze the first row (headers) so that even after scrolling I should be able to see the headers of the columns. Can someone please suggest how to do this for DataGrid? Please check the attached screenshots, I want to see Part Number, Part Description, Product Family even after scrolling.      
asked
4 answers
0

In the past I’ve had success by making separate text boxes above the data grid in order to achieve this. Perhaps you could try that?

answered
0

Hi Poorna Sandeep,

you could try to add styling to the grid header.

https://forum.mendix.com/link/questions/91580

answered
0

This is my file before editing.

This is my file after editing. I just added a new line at the end nothing else but still, it is showing an error. Please let me know to change the contents of it?

Sorry i can’t add images in the comment, so keeping it as a new answer.

answered
0

To solve your issue you need to look into your stylesheet (CSS). 
You would have to create a custom class (ex .sticky-header) for the datagrid header with a ‘position : sticky; ‘ in css code.

I have a link for you that will show you what I mean: http://jsfiddle.net/TylerH/gv9ugaw9/ 
If you’re unfamiliar with CSS you might want to look here: https://www.w3schools.com/css/ 

Good luck!

Edit:
Based on above screenshot (and below comment).
You need to compile your SCSS, you could use Calypso for this here: https://docs.mendix.com/howto8/front-end/calypso 

answered