Hi,
I wanted to fixed header of table record widget on the scroll of the webpage.
I follow this https://success.outsystems.com/Documentation/How-to_Guides/Front-End/How_to_scroll_records_in_a_table_with_a_fixed_header
But that didn't work out for me. Is there any other way we can achieve this then please attached the .oml here...
Thanks in advance.
Hi Rohan,
You need enclose your table inside a container and add following css in its style properties.
max-height: 260px; (you can change height value as per your need)
overflow-y: scroll;
and then add following css in your screen.
.TableRecords .TableRecords_Header {
position: sticky;
top: 0px;
}
Hope this works, Thanks :)
Hi Shweta,
I did that but the thing is that it will have scroll on table. Instead I want that scroll on the regular web page scroll bar and when we scroll that that header should visible when I am scrolling down through out the table.
Thanks for the comment...
Then just add this css inside your screen
top: 56px; (Adjust this value as per the Webpage header height not of table record header, in my case web header height is of 56 px, if you don't have header in your screen, you can just use top:0px)
Thanks :)
Hi Shewta
No will not work by top: xx PX. As in the image i don't want that that scroll with table instead it should be on the regular web page scroll.
Please check the below link, is this what you want?
https://shweta-gedam.outsystemscloud.com/ListSort/FixedTableHeader.aspx?_ts=637414986237749668
In this case, scroll is for the whole web page and OnScroll header would fixed at the top and scroll will continue.
Yes, That what I want can you share the this .oml?
Thank you...
I did this only with the CSS. Don't do anything with the TableRecords inside your screen. Remove the container with the height and overflow CSS applied earlier as i had told.
Just apply following CSS inside your theme stylesheet
top: 56px;
I have attached an OML for your reference.
Thank you :)
This is working fine in Chrome and Edge but not working in IE 11.
Thanks.....
Another possibility:
https://essr.outsystemscloud.com/TesteOrdenacao/HeroesInformations.aspx
This is not working IE browser. Thanks for the oml.
position:sticky, can only be used on these browsers
https://caniuse.com/css-sticky
Do you really need it in IE11?
Yes
One more doubt. Would it be a problem if the column widths were fixed?
Hi Eduardo,
Actually thing is that if we want to add or delete the columns in future then that will be painful to us with fixed widths. If it is irrelevant of column width then that will be good for us...
cheers.....
Hi, Rohan.
I added this javascript on screen to simulate the sticky. You still need to adjust the width of the columns, but if the functionality of pinning the header at the top of the screen works. I hope it helps to at least think of a better solution.
I am attaching the updated .oml to be able to verify
https://essr.outsystemscloud.com/TesteOrdenacao/Entry1.aspx?_ts=637417416218598838
Regards,
Eduardo