πŸš€ Implementing β€œShow More” Button in Interactive Grid in Oracle APEX

πŸš€ Implementing β€œShow More” Button in Interactive Grid in Oracle APEX

Interactive Grid is one of the most powerful components in Oracle APEX, widely used for displaying and managing large datasets.

By default, Interactive Grid uses pagination, which can sometimes impact user experienceβ€”especially when users prefer scrolling instead of switching pages.

In this blog, we’ll learn how to replace traditional pagination with a β€œShow More” (Load More) button, allowing users to load data dynamically.


🎯 What You Will Achieve

After implementing this solution:

βœ… Users can load more records with a single click

βœ… No need to navigate between pages

βœ… Improved user experience for large datasets

βœ… Cleaner and modern UI


🧰 Tools & Technologies

  • Oracle APEX
  • JavaScript
  • Interactive Grid

πŸ’Ό Business Requirement

In many enterprise applications:

  • Users work with large datasets
  • Pagination becomes tedious
  • Users prefer continuous scrolling or incremental loading

For example:

πŸ‘‰ Employee listing screen

πŸ‘‰ Order management dashboard

πŸ‘‰ Inventory data grid

Instead of clicking β€œNext Page”, users should be able to:

➑ Click β€œShow More”

➑ Load additional records instantly


βš™οΈ Step-by-Step Implementation


Step 1️⃣ Create Interactive Grid

Create an Interactive Grid based on your table (e.g., EMP).


Step 2️⃣ Add Static ID

Go to:

Region β†’ Advanced β†’ Static ID

Set a Static ID (optional but recommended):

emp_ig

Step 3️⃣ Add Initialization JavaScript Code

Navigate to:

Attributes β†’ Advanced β†’ JavaScript Initialization Code

Add the following code:

function( options ) {
    options.defaultGridViewOptions = {
        pagination: {
            loadMore: true
        },
        rowsPerPage: 5
    };
    return options;
}

🧠 Code Explanation

πŸ”ΉΒ loadMore: true

  • Enables β€œShow More” button
  • Replaces traditional pagination
  • Loads additional records dynamically

πŸ”ΉΒ rowsPerPage: 5

  • Defines how many rows to load initially
  • Each click on Show More loads the next set of rows

πŸ‘‰ You can increase this value based on performance needs.


πŸ–₯️ How It Works

Initial Load

  • Only 5 records are displayed

When User Clicks β€œShow More”

  • Next 5 records are loaded
  • Data keeps appending to the grid

🎨 UI Behavior

Traditional Pagination ❌

⬇

Modern Load More Button βœ…

This creates a smooth and app-like experience.


πŸ’‘ Use Cases

This feature is very useful in:

  • πŸ“Š Reporting dashboards
  • πŸ›’ Product listings
  • πŸ“¦ Inventory systems
  • πŸ‘¨β€πŸ’Ό Employee directories
  • πŸ“‘ Audit logs

⚑ Pro Tips

βœ” Use smaller rowsPerPage for better performance

βœ” Combine with Lazy Loading for large datasets

βœ” Avoid loading too many records at once

βœ” Test performance for large tables


πŸš€ Advanced Enhancement Ideas

You can further enhance this feature:

πŸ‘‰ Add infinite scrolling (auto-load on scroll)

πŸ‘‰ Combine with search filters

πŸ‘‰ Add loading spinner

πŸ‘‰ Highlight newly loaded rows


🏁 Conclusion

Using a simple JavaScript configuration, you can transform your Interactive Grid into a modern, user-friendly component with a β€œShow More” button.

This small enhancement:

βœ” Improves usability

βœ” Reduces navigation friction

βœ” Makes your app feel more responsive

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *