76
Views
16
Comments
Fixed table record widget on web page Scroll
Application Type
Traditional Web
Service Studio Version
11.8.6 (Build 28199)

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.  


2022-10-17 06-51-09
Shweta Gedam

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 :)

2020-06-27 18-35-53
Rohan Hanumante

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... 

2022-10-17 06-51-09
Shweta Gedam

Then just add this css inside your screen

.TableRecords .TableRecords_Header {

    position: sticky;

    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 :)

2020-06-27 18-35-53
Rohan Hanumante

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.

   

2022-10-17 06-51-09
Shweta Gedam

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.

2020-06-27 18-35-53
Rohan Hanumante

Yes, That what I want can you share the this .oml? 

Thank you...

2022-10-17 06-51-09
Shweta Gedam

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

.TableRecords .TableRecords_Header {

    position: sticky;

    top: 56px;

}

I have attached an OML for your reference.

Thank you :)

FixedTableHeader.oml
2020-06-27 18-35-53
Rohan Hanumante

Hi Shweta,

This is working fine in Chrome and Edge but not working in IE 11.

Thanks.....

2020-04-15 19-07-26
Eduardo Rodrigues
TesteOrdenacao.oml
2020-06-27 18-35-53
Rohan Hanumante

Hi,

This is not working IE browser. Thanks for the oml.

 

2020-04-15 19-07-26
Eduardo Rodrigues

position:sticky, can only be used on these browsers

https://caniuse.com/css-sticky

2020-04-15 19-07-26
Eduardo Rodrigues

Do you really need it in IE11?

2020-06-27 18-35-53
Rohan Hanumante

Yes

2020-04-15 19-07-26
Eduardo Rodrigues

One more doubt. Would it be a problem if the column widths were fixed?

2020-06-27 18-35-53
Rohan Hanumante

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..... 

2020-04-15 19-07-26
Eduardo Rodrigues

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

TesteOrdenacao.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.