scrollable table in table view

Got something cool to share with AppGini users? Feel free to post it here!
sacgtdev
Veteran Member
Posts: 75
Joined: 2020-06-10 11:14

Re: scrollable table in table view

Post by sacgtdev » 2021-07-07 08:26

Brilliant. It works well. Thank you.

SkayyHH
Veteran Member
Posts: 425
Joined: 2015-04-27 21:18

Re: scrollable table in table view

Post by SkayyHH » 2022-02-18 14:11

This is a cool solution :-)

Does anyone have this with the current AppGini version running? Unfortunately it doesn't work that way for me.

Thanks!

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: scrollable table in table view

Post by pbottcher » 2022-02-19 08:27

Hi,

can you tell what is not working.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

SkayyHH
Veteran Member
Posts: 425
Joined: 2015-04-27 21:18

Re: scrollable table in table view

Post by SkayyHH » 2022-02-19 09:21

I'm probably doing something wrong. So I want to know if it works with the current AG version :-)

In footer-extras it has no effect on my app, in the table_name.php in the footer I get the error:

Parse error: syntax error, unexpected 'tableview' (T_STRING) in C:\wamp64\www\AppGiniMSY\hooks\todo_de.php on line 75

But if I know that the current version works, I'll try something else :-)

Many greetings,

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: scrollable table in table view

Post by pbottcher » 2022-02-19 09:25

Hi,

I would not see why it should not work with the current version. Maybe you can post some screenshots and the code you are using
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

SkayyHH
Veteran Member
Posts: 425
Joined: 2015-04-27 21:18

Re: scrollable table in table view

Post by SkayyHH » 2022-02-19 09:39

Thank you very much.

I'll try a bit myself first so as not to take up your time :-)

SkayyHH
Veteran Member
Posts: 425
Joined: 2015-04-27 21:18

Re: scrollable table in table view

Post by SkayyHH » 2022-02-19 09:53

It works now. Thanks much. I had a conflict with another CSS. I now take this code:

Code: Select all

<?php if ($_REQUEST['Print_x'] != 1) {
echo $_REQUEST['Print_x'];
echo <<<EOT
<style>

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

<script>
\$j('table').append(\$j('thead'));
// check for IE
if (navigator.userAgent.search("NET4.0") >= 0) {
\$j('div.table-responsive').on('scroll', function() {
\$j('th', this).css('transform', 'translateY('+ this.scrollTop +'px)');
});

}
else {
if (navigator.userAgent.search("Edge") >= 0) { // check for Edge
\$j('.table-responsive').find('th').each(function() {\$j(this).css({"position": "sticky", "top": "0" })});
}
\$j('div.table-responsive').on('scroll', function() {
\$j('thead', this).css('transform', 'translateY('+ this.scrollTop +'px)');
});
}
</script>;
EOT;
} ?>

However, I still have a ";" under the table to stand. Can it be that behind EOT no ; comes?

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: scrollable table in table view

Post by pbottcher » 2022-02-19 10:55

Hi, glad to read that it still works.
For the ;, I would rather think the ; is the one after the </script>;
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

SkayyHH
Veteran Member
Posts: 425
Joined: 2015-04-27 21:18

Re: scrollable table in table view

Post by SkayyHH » 2022-02-19 13:01

It is it :-)

Thanks very much!!

Post Reply