You need to sign in to do that
Don't have an account?

Fix the DataTable header in lightning Design system?
Hi I created a VF page using SLDS, and created an table using slds-Data-Table. My datatable volume is large and I need to have the header fixed. I tried searching for solution and not able to get succeeded. Could anyone please help if you come across this scenario.
I don't think there is an SLDS class specifically that enables scrolling if you have large amounts of data, however an easy way to enable this using standard CSS is to do the following: EDIT: As @techbusinessman wrote in a comment below, there is now a standard utility class for making a div scrollable. The documentation can be found here:
- https://www.lightningdesignsystem.com/components/utilities/scrollable/#overview
The code would now be as follows: Hope this helps.Please mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra
I believe I can't use your suggestion, because I have a datatable populated from a wrapper class. Even the column header is dynamically written from the wrapper values. If I create two div using two different datatables then I can't bring back the two tables aligned in the same fashion(I mean column alignment with the next table). Do you think we can align both the tables?
I have created two seperate tables one for header and one for body. This way you can apply scroll to the body and achieve the functionality.
CSS
Let me know if this solves your problem.