Records Per Page Dropdown

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
rpierce
Veteran Member
Posts: 304
Joined: 2018-11-26 13:55
Location: Washington State

Records Per Page Dropdown

Post by rpierce » 2025-04-16 20:52

Is there a way to hide/remove the "Records Per Page" dropdown menu in AppGini? I want to show more than 200 records per page. The issue is that if a user clicks on that dropdown then the Records Per Page setting in AppGini is overridden and you are limited to a max of 200 records per page. I'm using version 24.17 at the moment because newer versions have issues that I am unable to resolve.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1944
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Records Per Page Dropdown

Post by jsetzer » 2025-04-17 04:33

I want to show more than 200 records per page
How to change the records-per-page dropdown entries

Code: Select all

<script>
    // file: hooks/header-extras.php
    AppGini.config.recordsPerPageOptions = [10, 25, 50, 100, 250, 1000];
</script>
chrome_Kxuqo4Vraq.png
chrome_Kxuqo4Vraq.png (11.43 KiB) Viewed 6222 times

---
Is there a way to hide/remove the "Records Per Page" dropdown menu in AppGini
(1) How to visually hide records-per-page selector

Code: Select all

<script>
    // file: hooks/header-extras.php
    jQuery(() => { jQuery('#records-per-page-selector').closest(".form-inline").hide(); });
</script>

---

(2) How to overwrite the method which renders the records-per-page selector

Code: Select all

<script>
    // file: hooks/header-extras.php
    let blacklist = ['TABLENAME', 'TABLENAME2', '...']; // tablenames as array
    if (blacklist.include(AppGini.currentTableName()))
        AppGini.renderTVRecordsPerPageSelector = () => { };
</script>
Note: I haven't tested completely combinations of $options, $_SESSION-variables, $_POST-arguments etc.. So, I'm not sure if this will work in your scenario.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 25.10 + all AppGini Helper tools

Post Reply