scrollable table in table view

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 330
Joined: 2018-04-01 10:12

scrollable table in table view

Post by pböttcher » 2018-05-01 20:58

Hi all,

I thouht that this might be interesting for someone who has larger table to display in the table view.
You can set the records per page , but this may lead to a long scrolling list where, when are in the middle of the table, it might be difficult to scroll to the right.

Hence if you add this

Code: Select all

<style>

.table-responsive { overflow: auto; width: 100%; height: 66vh; }   
.table  th { background:#eef; }
		</style>

<script>

$j('div.table-responsive').on('scroll', function() {
  $j('thead', this).css('transform', 'translateY('+ this.scrollTop +'px)');
});

</script>
to the hoos/footer-extras.php you will get a scollable view of your table (table header colored) which allows you to scroll within one page to the bottom of the table and/or to the right as needed. Also the header stay stable.
You may need to adjust the hight to fit your environment.

regards
Pascal

Bertv
Veteran Member
Posts: 58
Joined: 2013-12-11 15:59

Re: scrollable table in table view

Post by Bertv » 2018-05-02 14:58

Thanks for sharing this. It looks great.
Bert
I am using Appgini 5.72

User avatar
Jay Webb
Veteran Member
Posts: 35
Joined: 2017-08-26 15:27
Contact:

Re: scrollable table in table view

Post by Jay Webb » 2018-05-07 08:29

This is frigging awesome, works perfect, Thanks for sharing this, one of my table has 20,000 rows now I can increase rows per page to 100.
What we envision, we make happen.

AhmedBR
Veteran Member
Posts: 190
Joined: 2013-09-19 10:23

Re: scrollable table in table view

Post by AhmedBR » 2018-05-07 20:21

Thanks for sharing. Works great :D

sjohn
Veteran Member
Posts: 61
Joined: 2018-05-23 09:32

Re: scrollable table in table view

Post by sjohn » 2018-06-28 11:20

This is a very useful and brillant piece of code.

I have already used it in a project, and I think I will use it in ALL projects.
I think that when you have over 1000 records in a table, it will be very relevant to use this.

I also want to thank you, for sharing this with us.

hubert
Posts: 17
Joined: 2018-12-06 22:32

Re: scrollable table in table view

Post by hubert » 2018-12-09 10:22

Many thx, perfect, needs to be integrated in AppGini !

Post Reply