Application Templates just got better!

We’re excited to announce major enhancements to our GridPHP application templates! Our template center has been completely revamped with powerful new features that make building data-driven applications faster and more intuitive than ever before.

What’s New?

Our enhanced templates now come packed with enterprise-grade features that transform how you visualize and interact with your data. Whether you’re building a CRM, inventory system, or any data-intensive application, these improvements will supercharge your development workflow.

Enhanced Dashboard with KPI Boxes

Get instant insights at a glance with our new KPI (Key Performance Indicator) boxes. The dashboard now features:

  • Real-time metrics displayed in clean, modern KPI cards
  • At-a-glance overview of your most important business metrics
  • Color-coded indicators for quick status assessment
  • Responsive layout that adapts beautifully to any screen size

Perfect for executives and team members who need to monitor critical business metrics without diving into detailed reports.

Advanced Data Visualizations

Interactive Bar Charts

Transform your data into compelling visual stories with our new bar chart visualization:

  • Dynamic filtering and drill-down capabilities
  • Customizable colors and themes
  • Hover tooltips for detailed information
  • Export functionality for presentations and reports

Ideal for comparing performance across categories, tracking trends over time, or analyzing sales by region.

Beautiful Pie Charts

Our pie chart visualization makes it easy to understand proportions and distributions:

  • Interactive segments with click-to-filter functionality
  • Percentage labels for clear data representation
  • Legend with color coding for easy reference
  • Smooth animations that engage users

Perfect for showing market share, budget allocation, or any categorical data distribution.

Comprehensive Table Visualizations

Need a detailed view? Our enhanced table visualization offers:

  • Sortable columns for quick data organization
  • Advanced filtering options
  • Pagination for large datasets
  • Inline editing capabilities
  • Export to Excel/CSV functionality

Great for users who need to work with detailed data records and perform in-depth analysis.

Powerful Data Grid

At the heart of every template is our enhanced data grid that gives you complete control:

  • CRUD operations (Create, Read, Update, Delete) out of the box
  • Advanced search and filtering
  • Bulk operations for efficiency
  • Inline and form editing modes
  • Column reordering and resizing
  • Conditional formatting for visual cues

Master your data with a grid that’s both powerful and user-friendly.

Organized Reports Menu

Navigate your application effortlessly with our new reports menu structure:

  • Hierarchical organization of reports and dashboards
  • Quick access to frequently used views
  • Custom menu items for your specific needs
  • Icon support for visual navigation
  • Collapsible sections to reduce clutter

Everything you need is just a click away, making navigation intuitive for all users.

Built on Solid Foundations

All these enhancements build upon the core features that have made GridPHP templates so popular:

  • Secure authentication system with login protection
  • Role-based authorization for granular access control
  • User management built-in
  • Mobile responsive design that works on all devices
  • Easy setup with loads of customization flexibility

Ready to Get Started?

Our enhanced templates are available now and include:

  • Event Planning
  • Employee Directory
  • Expense Tracker
  • Donation Management
  • Sales CRM
  • Inventory Management
  • Patient Management

Each template comes with all these new features pre-configured and ready to customize for your specific needs.

Why Choose GridPHP Templates?

  1. Save Development Time: What would take weeks to build from scratch is ready in minutes. Focus on customization instead of building basics.
  2. Professional Quality: Get enterprise-grade features without enterprise-level development costs.
  3. Outstanding Support: Our technical support team is here to help you succeed with quick, helpful responses.
  4. Easy Customization: Start with a working application and modify it to match your exact requirements.

Get Your Template Today

Visit our Template Center to explore all available templates and see these enhancements in action. Each template comes with complete source code, documentation, and our commitment to your success.

Transform your data into insights. Build applications that users love. Get started with GridPHP templates today!


Questions about our templates? Contact our support team – we’re here to help you choose the right template and get started quickly.

 

Handle Many-to-Many relations in GridPHP

Hello,

In this post, we’re showing a practical example, handling data of companies with multiple business interests.

GridPHP - Handling Many to Many Relations


The Problem

You have companies. Each company has multiple interests (Software Development, Cloud Computing, etc.). Each interest can belong to multiple companies.

The traditional approach means:

  • 3 tables with complex JOINs
  • Custom forms for managing relationships
  • Manual junction table handling
  • Hours of debugging

A Simpler Way

Here’s a working example using GridPHP that handles all the complexity automatically.

Database Setup

-- Three simple tables
CREATE TABLE companies (
  id int PRIMARY KEY AUTO_INCREMENT,
  name varchar(255),
  address varchar(255),
  phone varchar(15)
);

CREATE TABLE ref_interest (
  id int PRIMARY KEY AUTO_INCREMENT,
  name varchar(45)
);

CREATE TABLE company_interest (
  company_id int,
  interest_id int,
  PRIMARY KEY (company_id, interest_id)
);

The Smart Query

Instead of showing relationships in separate rows, use GROUP_CONCAT:

$g->select_command = "SELECT c.id, c.name, c.address, c.phone, 
                      GROUP_CONCAT(i.id) as interests
                      FROM companies c 
                      LEFT JOIN company_interest ci ON c.id = ci.company_id 
                      LEFT JOIN ref_interest i ON ci.interest_id = i.id 
                      GROUP BY c.id";

This displays all interests for each company in a single row.

Auto-Handle Junction Table

The key is custom handlers that manage the junction table automatically:

function update_company_interest($data) {
    global $g;

    // Update company info
    $g->execute_query("UPDATE companies SET name=?, address=?, phone=? WHERE id=?", 
                      array($data["params"]["name"], 
                            $data["params"]["address"], 
                            $data["params"]["phone"], 
                            $data["id"]));

    // Delete old relationships
    $g->execute_query("DELETE FROM company_interest WHERE company_id=?", 
                      array($data["id"]));

    // Insert new relationships
    if (!empty($data["params"]["interests"])) {
        $interest_ids = explode(",", $data["params"]["interests"]);
        foreach ($interest_ids as $interest_id) {
            $g->execute_query("INSERT INTO company_interest VALUES (?, ?)", 
                            array($data["id"], $interest_id));
        }
    }
}

Multi-Select Interface

Add a searchable multi-select dropdown:

$col["edittype"] = "select";
$col["editoptions"] = array(
    "value" => $g->get_dropdown_values("SELECT id, name FROM ref_interest"),
    "multiple" => true,
    "dataInit" => "function(el){ 
        jQuery(el).select2({tags:true}); 
    }"
);

The Result

Users see a grid with companies and their interests. When editing:

  1. Click edit on any row
  2. Multi-select dropdown appears with search
  3. Select/deselect interests
  4. Save – junction table updates automatically

Time saved: 3 days → 1 hour

GridPHP - Handling Many to Many Relations

Use This Pattern For:

  • Users ↔ Roles
  • Products ↔ Categories
  • Students ↔ Courses
  • Posts ↔ Tags

Complete Code

Full working example: GitHub Gist


Bottom line: Many-to-many relationships don’t need to be complicated. Use GROUP_CONCAT for display, custom handlers for the junction table, and a multi-select UI for user-friendly management.

Have a many-to-many challenge? This pattern works for any scenario with 3 tables and complex relationships.

Next Actions

Active License Subscription customers can get free upgrade using this link.

Expand Row to View Details

Hello,

Exciting update for PHP developers! GridPHP now allows you to view row data by expanding the row grid, making data exploration more intuitive and user-friendly.

The working demo can be checked online and inside full version package in demos/master-detail/subgrid-view.

Live Demo: Click Here

Next Actions:

Active License Subscription customers can get free upgrade using this link.

DataGrid AI Assistant – Smarter Data Analysis & Insights!

Experience the Power of AI in Grid 4 PHP Framework!

We’re thrilled to introduce a game-changing feature in Grid 4 PHP – the AI Assistant! Now, you can interact with your DataGrid like never before. Simply ask questions about your data, and the AI Assistant will provide instant insights, trends, and summaries – saving your time and effort.

Get a quick overview by watching the intro video.

What Can AI Assistant Do for You?

✔ Get instant summaries and reports from your DataGrid
✔ Ask complex queries and receive smart insights
✔ Automate analysis without writing complex SQL queries
✔ Provide smart suggestions for better data analysis

How to Use the AI Assistant?

Open Your DataGrid & Click on the AI Assistant button.

It will suggest you some insights which you may ask. Type your query (e.g., “Show me the top 10 sales regions”).

Get instant insights and smart recommendations!

Unlock This Feature Today!

  • If you’re on a free version, now is the best time to upgrade and unlock the full potential of AI-driven data intelligence – Buy Licensed Version.
  • If your subscription has expired, renew today and stay ahead with cutting-edge technology! – Upgrade Now to latest version.
  • This feature update is available for free to all users with an Active Subscription! – Get your Free Upgrade using this link.

Stay ahead with the next generation of data intelligence in Grid 4 PHP Framework!

Released Version 3.0

Welcome to the new release (version 3.0) of the Grid 4 PHP Framework. There are many updates in this version that we hope you will like. The following are some of the key highlights.

  • Ready-made Application Templates
  • Laravel v12 Integration
  • Improved WordPress v6 Integration
  • UI and Design improvements
  • Free Version with Premium Features
  • Several Optimizations & Updates

Ready-made Applications: We’ve developed several ready-to-use applications using our PHP DataGrid Framework, which includes built-in features such as:

  • Authentication System
  • Role-based authorization
  • User management.

In the code, simplicity is maintained to make it easier to understand and customizable. Making these applications significantly enhanced the core library and added many improvements.

We have released five application templates so far, with more coming soon.

  1. Sales CRM
  2. Inventory Tracking System
  3. Employee Directory
  4. Donation Management
  5. Expense Tracker

Following is the screen of Sales CRM Demo:

Following is the screen of Employee Directory Demo:

Laravel v12 Integration: Grid 4 PHP Framework is tested with Laravel v12. Seamlessly combine the power of responsive PHP DataGrid with Laravel to build your next web application with ease and efficiency.

WordPress6 Integration: We’ve further enhanced the integration of our DataGrid solution with WordPress, now supporting Master-Detail Sub-Grids and file uploads. Read more here.

Bootstrap5 Integration: Grid 4 PHP Framework is ready to use with Bootstrap v5.3. Roll-out your next web-application with combining power of responsive PHP Data Grid and Bootstrap5 UI design.

Free Version with Premium Features:

In this release, we’ve revamped the packaging of our free version! It now includes all premium features, including sample application templates, allowing free users to experience the full power of our product. The only limitation? A restricted number of records per grid.

The free version is available for evaluation and non-commercial use, giving you a complete preview of what our framework can do before upgrading.

Other Updates & Optimizations:

  • Direct URL of add/edit/view dialogs
  • Enhanced URL based filtering scheme
  • Import module now updates data based on existing first column
  • Integrated select2 component for dropdowns if JS library included
  • Audit log data added for insert and update events

Next Actions:

Active License Subscription customers can get free upgrade using this link.

Laravel DataGrid Guide

Looking for a robust DataGrid solution for your Laravel application? Our product offers a comprehensive DataGrid interface with CRUD (Create, Read, Update, Delete) features, providing a seamless way to manage and display data without relying on Eloquent.

Following is the guide to integrate PHP Editable DataGrid with Laravel v12.

Step1: Folder placements in Laravel.

There are 2 main folders in Grid 4 PHP Framework package archive. You need to:

Copy the contents of lib/inc folder —> <Laravel>/app/Classes/Gridphp
Copy the contents of lib/js folder —> <Laravel>/public/assets/gridphp

The ‘app/Classes’ folder does not exist by default in Laravel. You may create it for 3rd party class libraries.
Create another folder inside it with name ‘Gridphp’ and move all contents of ‘lib/inc’ in it. Final result will look like this:

In similar way, copy the files from lib/js to laravel/public/assets/gridphp. Final result should look like following:

Step2: Setting Up Factory Class & Controller:

To use datagrid object in controller, we have setup a factory class in ‘laravel/app/Gridphp.php’. The purpose of this class is to:

  • Set the database configuration.
  • Autoload the library files
  • Provide a get() method to be used in controller.

Now in controller, we used the namespace of our factory class and called the get() function to get the datagrid object. The rest code is same as in our demos. Finally, we passed the output of render() function to view with a variable name ‘grid’.

For demo purpose, we’ve modified ‘laravel/app/Http/Controllers/WelcomeController.php’

Step3: Setting View code:

  1. In view code, we included the JS/CSS files from the ‘js’ folder which we copied in Step 1.1
  2. And using blade template variable output, we pushed the grid output in our desired place in html.
  3. We have html meta tag for ‘csrf-token’, which is required by laravel for POST operations. Also added JavaScript code to pass CSRF-TOKEN in ajax request calls, as mentioned in Laravel docs.

For demo purpose, we slightly modified ‘laravel/resources/views/welcome.blade.php’

Step4: Setting Routes

The Last step in this tutorial is to set the routes to our controller. We will use both GET and POST routes as our grid uses both methods.

Note: The DataGrid does not rely on Eloquent ORM model of Laravel. It uses its own backend libraries.

Result: The Editable DataGrid for Laravel!

Next Actions:

Using Grid 4 PHP Framework in WordPress

As popularity of WordPress is growing really fast, we’ve published a new simplified tutorial on how to integrate Grid 4 PHP Framework with WordPress Sites. WordPress misses a comprehensive Editable Table, DataGrid and a CRUD solution, so we’ve integrated it to solve the problem.

It allows using all features of our Data Grid inside WordPress and much simpler than previous implementations. Steps required to integrate are following:

Updated 10-Dec-2024: New revised tutorial supports:

  • Nested Sub-Grids for Master-Detail views supported now.
  • File uploading Support

Updated 30-July-2024: New revised tutorial supports:

  • PHP 8.3 and WordPress 6.4.3
  • DataGrid custom event handlers as well.

Step1: Download Free version or Buy package from our website (if not already done) and move “lib” folder from package in your WordPress root directory, and rename “lib” folder as “phpgrid”

and inside this folder the contents should be:

Step2: Install WordPress plugin “Code Snippets” from wordpress.org/plugins/code-snippets/ OR download from Github Repository and install manually.

Step3: Goto admin panel and click Add Snippet as in image. Add any title you like and in code section, copy paste this Sample Snippet Grid Code in code section shown below:

Step4: In this code, we have created a shortcode here same as class name: [phpgrid_users] and we will now place it on page where we want to show our Datagrid.

Result: Now Save the page and open / preview it, you will get the Datagrid.

WordPress featuring Sub-Grids:

Adding Grid in WordPress Admin Area:

Following steps will be required to make shortcode available in admin area – plugin development.

Step1: Add admin_init & admin_footer hook along with others.

Step2: Select ‘Run Snippet everywhere’ after snippet code block.

Step3: Call do_shortcode() function where you want to show datagrid.

Result:

You can create more snippets by copying code from package demos and assign new unique class name for each grid which can be placed on your page/post of WordPress.

Let us know your feedback. If you have any questions, contact our support center.

Next Actions:

Active License Subscription customers can get free upgrade using this link.

Released Version 2.9

Welcome to the new release (version 2.9) of the Grid 4 PHP Framework. There are many updates in this version that we hope you will like, Following are some of the key highlights.

  • PHP 8.3 support
  • CodeIgniter v4 Integration
  • Using with Laravel v11
  • WordPress v6 Integration
  • Bootstrap v5 Integration
  • Drag-and-Drop Row Sorting, Effortlessly
  • Capture Digital Signatures with DataGrid
  • Badges and Dropdown rows
  • Rating plugin
  • New Html Input Types support: e.g. color, number, date
  • Export to MS-Word
  • UI and Design improvements
  • Security updates

CodeIgniter 4 Integration: We’ve made a quick walk-through how to integrate the smart PHP DataGrid with CodeIgniter framework.

Row Drag-and-Drop Sorting: To manage and organize your data in an intuitive and user-friendly manner.

WordPress6 Integration: We’ve published a new simplified tutorial on how to integrate Grid 4 PHP Framework with WordPress Sites.

Bootstrap5 Integration: Grid 4 PHP Framework is ready to use with Bootstrap5. Roll-out your next web-application with combining power of responsive PHP Data Grid and Bootstrap5 UI design.

Capturing Digital Signature: You can now take Digital Signatures using DataGrid and save it in the database.

Star Rating Plugin: Add a rating star plugin to be used as a column formatter.

Fixes:

  • Database layer library update
  • Toolbar button position, Autoheight update
  • Excel export library update
  • Better MS SQL Server FreeTDS support
  • Informix database fixes
  • Many reported bug fixes and updates.

This version will work on PHP v7 and onwards. For older PHP versions, v2.8.2 was the last stable release.

Next Actions:

PHP DataGrid for CodeIgniter

We’ve made a quick walk-through how to integrate the smart PHP DataGrid with CodeIgniter framework. For this, we have used:

  • Grid 4 PHP Framework 2.9
  • Latest version of CodeIgniter (v4+)
  • PHP 8 (can work on lower supported versions as well)

In this code we used MySQL, however you can use PHP DataGrid combination with almost all famous Database engines including Oracle, Microsoft SQL Server, DB2, Postgres, SQLite, Firebird, etc.

Steps:

Steps to integrate are very simple.

  1. Download CodeIgniter archive from Github repository and extract it in your public_html / htdocs / similar web public folder of your web server. Make sure it is showing the CI startup page.
  2. Download the Grid4PHP archive from our website. You can either use free OR paid version, Comparison is available here. Free version provides basic essential functions for evaluation purpose.
  3. Extract the Grid4PHP archive and move the ‘lib’ folder from archive to the ‘public’ folder of CodeIgniter.
  4. Replace the code of CI’s Controller app\Controller\Home.php with this sample controller code.
  5. In View, include the JS and CSS files and echo variable passed from controller. CI’s View welcome_message can be replaced with this sample view code.
  6. In Controller, make sure you set the database configuration (Line 9-14) and a table to fetch data (Line 45), according to your requirement. Refer lines in sample controller code.

Troubleshooting:

  • Getting “Whoops! We seem to have hit a snag. Please try again later”. If you see this message after setting up, please check the log file of CodeIgniter in “writable/logs” folder. It will tell the exact reason behind it.
  • Make sure you have “intl” and “curl” php extensions installed. They are required by CodeIgniter 4.
  • You can always open a support ticket for us.

Next Actions:

SQL Server Integration Just Got Better with PHP Data Grid

Hello,

We’ve just added improved support to use our PHP Data Grid with MS SQL Server. The demo browser that comes with the product can now be tested with SQL Server database along with MySQL database.

To install demos with PHP and MS SQL Server, Download the package from our download page and then install the database from the MS SQL Server database script.

To connect MS SQL Server, you must have SQL Server Native driver for PHP installed on your environment. Next you can use one of the following connection settings to be set in config.php. For example:

// Using PDO
define("PHPGRID_DBTYPE","pdo");
define("PHPGRID_DBHOST","sqlsrv:Server=den1.mssql5.gear.host");
define("PHPGRID_DBUSER","testdb63");
define("PHPGRID_DBPASS","testpass");
define("PHPGRID_DBNAME","testdb63");

// Using PHP Native SQL Server Driver
define("PHPGRID_DBTYPE","mssqlnative");
define("PHPGRID_DBHOST","den1.mssql5.gear.host");
define("PHPGRID_DBUSER","testdb63");
define("PHPGRID_DBPASS","testpass");
define("PHPGRID_DBNAME","testdb63");

// Using OBDC Driver
define("PHPGRID_DBTYPE","odbc_mssql");
define("PHPGRID_DBHOST","Driver={SQL Server};Server=den1.mssql5.gear.host;Database=testdb63;");
define("PHPGRID_DBUSER","testdb63");
define("PHPGRID_DBPASS","testpass");
define("PHPGRID_DBNAME",null);

Troubleshooting:

Best way to troubleshoot database connection is to make an independent php file with just php-sqlserver connection code as shown in php manual. When it works, just put the verified configuration in config.php file of php data grid.

What Next: