I'm looking for help with making my table headers repeat, like the "repeat header row" option for tables in Word. I'd also like the columns to be sortable, but I don't see an option for that in the table styles. Has anyone been able to create sortable table columns?
To create a repeating header, I tried adding "position: sticky;" and "top: 0;" to the tableheader css, but that just made the header row fixed to one position, and everything else on the page scrolled behind it. I'm not sure how to get the header row to repeat but then stop after the last table row.
Thank you!
Repeat Table Header Row and Sort Columns
-
- Propeller Head
- Posts: 15
- Joined: Mon Jul 09, 2012 2:42 pm
-
- Sr. Propeller Head
- Posts: 249
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Repeat Table Header Row and Sort Columns
Hi,
To add header rows, or footer rows to a table, right click the table and choose Table Properties. In the General tab and Table Size section, add as many or few header/footer rows as you like. These will automatically repeat at the top/bottom of each page of the table.
Not sure what you mean about making columns sortable. If you select rows in the table and right click/select Sort you can choose how the data is presented. You can't make the table live-sortable in the output format.
Hope that helps,
Rob
To add header rows, or footer rows to a table, right click the table and choose Table Properties. In the General tab and Table Size section, add as many or few header/footer rows as you like. These will automatically repeat at the top/bottom of each page of the table.
Not sure what you mean about making columns sortable. If you select rows in the table and right click/select Sort you can choose how the data is presented. You can't make the table live-sortable in the output format.
Hope that helps,
Rob
-
- Jr. Propeller Head
- Posts: 6
- Joined: Wed Mar 23, 2022 8:17 am
Re: Repeat Table Header Row and Sort Columns
That works for a single table. But how do I add this setting to my style sheet so that ALL table headers will repeat?
Thanks,
Sharon Ra'anan
Thanks,
Sharon Ra'anan
-
- Sr. Propeller Head
- Posts: 249
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Repeat Table Header Row and Sort Columns
A common thing to do if you have a bit of repeated code in your documents is to create a snippet as a template for it. I use this method for processes and some tables as I want them to always look the same. Create a table with your particular style, columns, headings, rows. Select the table and create a new snippet from it. Then when you want a new table in a to[pic, insert the snippet, right click it and Convert to Text.
Rob
Rob