Examples › Pinning the last column
fix, fixed, affix, stickyYou may have noticed that when you’re using records selection and the table needs to scroll horizontally, the checkbox column is always visible. This is because the checkbox column is pinned to the left side of the table.
In the same way, when a table has many columns, you may want to pin its last column to the right side of the table, so that it stays visible even when the table is scrolled horizontally. For instance, you could use this feature to make sure the row actions are always visible.
You can achieve this by setting the pinLastColumn DataTable prop to true:
Here is the code:
Using with column grouping
Here is an example of how you can pin the last column when using column grouping. Notice how the last group contains only one column, and how we’re using an absolutely positioned custom title component to create the illusion that the Actions title is centered vertically:
Here is the code:
Head over to the next example to discover how you can pin the first column to the left side of the table.














