I have a wide table with horizontal scrolling. The user has the ability to show/hide columns. As they hide more columns and the total width becomes less than the scrolling area and table width, the remaining columns stretch to fit the available empty screen.
That's all great except I have a totals row underneath that doesn't stretch in the same manner because most of the columns are empty. So as they hide columns, the totals no longer appear below their respective table columns.
How can I set the main table columns not to grow? I can't turn off wrapping because they need to see the whole field.
In the image below, I have a fixed width container for all of the total row columns. But they don't shrink or grow like the main table columns.
Hi @Jeff Kest ,
I think the simplest way to keep your total row in sync is to not have a separate table, but use the last row of your data as a fake footer row.
You can make it sticky and/or style it differently by targeting it in your css with :last-row pseudo code. This is not a real footer, but as OutSystems doesn't offer that on the table widget, it would require javascript to add it.
See attached oml, it makes the header and last row sticky, the rest of the table is scrollable. If you add or remove a column (by making it display:none) everything stays nicely aligned, and you don't have to make any of the columns a fixed width and loose the adaptability.
Dorine
DorinesTagTable DorinesTagScroll DorinesTagOutSystemsUI DorinesTagOML
Hi Jeff,
one way I see as possible is on the total row create as a table with only one row with the values they should have and when the user shows/hides or resize any column on the main table, is it possible to reflect those actions on the total table, in other words, column by column give the same width on both tables.
Another way would be to have the total values on the last row of the table, but with these option the user would have to scroll down to see those values and I guess they wouldn't like.
Regards
I've tried it two ways, once with the totals row as a table with each column sized the same as the main table and also as just a container with subcontainers sized the same way. All the totals row containers are set to hide or show along with the main table.
It's that the totals row cells don't stretch like the main table cells. I'm trying to lock those down.
Jeff,
have a look at the table with the totals if it has the same properties as the main table, I don't know (and I'm sorry for that) if in runtime if it is possible to change programmatically the atributes of the columns, so when the user resizes one column in the background the system resizes the same column on the totals table.
Regards and keep us posted please, it always great to learn something new.