Using PHP Grid Framework in Joomla

We’ve published a new tutorial on how to integrate PHP Grid Framework with Joomla 3.9.8. It allows using all features of our Data Grid inside Joomla and with much simpler implementations. Steps required to integrate are following:

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

Step2: Create a new file ‘demo.php‘ inside ‘phpgrid’ folder and copy paste joomla code snippet from here.

Step3: Install Joomla extension “Sourcerer (free version) By RegularLabs” from Here OR download from our Github Repository. No need to buy Pro Version.

Step4: Now after installing this extension, edit the article where you want to display grid and include the demo.php file using sourcerer php syntax:

{source}
<?php require_once JPATH_ROOT.'/phpgrid/demo.php'; ?>
{/source}

Step5: A modifications which will allow PHP Grid to perform ADD and EDIT operations inside of Joomla. Edit Joomla ‘index.php‘ file in root folder and

For Joomla 4, Paste the code below immediately before this line:

// Run the application – All executable code should be triggered through this file
require_once dirname (__ FILE__). ‘/includes/app.php’;

and For Joomla 3 or before, Paste the code before this line:

$app->execute();

This is the code to paste in index.php:

// Joomla will read the REQUEST array and the router gets confused when data grid posts data
// the data is still in the POST array so removing it this does no harm to Grid PHP
if (isset($_POST['id'])){
unset($_REQUEST['id']);
}

Result: Now Save the article and open it in browser, you will get the demo datagrid.

Next Actions: You can create more grid php files (like in step2) by copying code from package demos and include them using sourcerer syntax (step4) on your desired article of Joomla.

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

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

PS: Special thanks to Doug Lawson for his contribution in this tutorial.

Demo Application: Todo List

To show some basic features of php grid framework, we created a very simple demo of “todo list” and following features are used:

  • Bootstrap 4 + Mobile sidebar filter menu
  • Conditional Formatting
  • Custom delete event callback for soft delete
  • External Search form (date range, text, priority filters)
  • Checkbox with default edit mode
  • Export to Excel

Desktop screen:

Mobile screen:

Next actions:

Basic Authentication for PHP Grid

On some cases, we just want to password protect our page without including the hassle of heavy frameworks (like Laravel, Yii, Symfony etc) and databases. This solution works without any database and have credentials hard-coded in authentication file. You can add or modify accounts by changing php array values. Refer comments inside file for configuration options.

Download basic authentication include file here.
(save it as auth.php)

Step 1) Include “auth.php” file on page which need to be password protected. Include before any output / echo and at start of code. Adjust include path accordingly where you place the file.

Step 2) Configure user/pass by editing auth.php – e.g. ‘username’ => ‘password’. You can also set after logout url. e.g. your login page url.

Result: Now when you access protected page, you will get following login screen. Entering user/password will allow you the access.

To Logout, access same grid page with logout=1 query-string param. e.g. https://example.com/grid.php?logout=1
Feel free to change the appearance by modifying css files and hacking html code.

Download basic authentication include file here.
(save it as auth.php)

New Documentation Site

Another update for all, we just launched our new documentation section to improve usability and better understanding of our product (PHP Grid Framework). The new documentation site is categorized in content sections on left with a search box on top right. There is also a live chat / email message box on bottom right. To go to parent website use main site link on top.

The most impressive feature is ‘quick search’ which is super fast (powered by lunr-js) and fetch results from every section of documentation in no time.

Share you feedback and improvement suggestions as well.
Happy coding.

Global Search feature

Hello,

We recently added global search feature in PHP Grid Framework that allows to search your term in all searchable fields of grid. It will save time and quickly filter your data.

Since v2.5+, you can enable this feature by setting:

$g = new jqgrid();
...
$opt["globalsearch"] = true;
...
$g->set_options($opt);

Active license customers can request upgrade using this link.
To purchase license, you can visit this link.

Happy Coding …

TreeGrid – Hierarchical Data Display

Hello,

We’ve updated a demo that support displaying parent-child relational data in form of tree grid. It is done by simple configuration on PHP Grid Framework where you define the parent and child fields of same table. For example in following example, EmployeeId is ID field and ReportsTo is Parent Relation field that makes this tree grid. This framework already support variety of database connections e.g. SQL Server, Oracle, DB2, Postgres, Mysql etc so you can have this Tree-grid in all supported databases.

Database Table:

Tree Grid Sample:

Next Actions:

Licensed customers can request free upgrade using update link.
To purchase license, you can visit this link.

Use Sparklines to show trends on Datagrid

We’ve added support for visual representation of data using Sparklines in PHP Grid Framework. Sparklines charts can be used to show trends in a series of values, such as seasonal increases or decreases, website traffic, economic cycles, or to highlight maximum and minimum values. 

Now you can have Line, Bar, Composite (Both line/bar), Pie, Discrete, Bullet, Won-Lost, Color Map and Box Sparklines along with your other information. Few of them are shown in demo screenshot:

Licensed customers can request free upgrade using update link.
To purchase license, you can visit this link.

Import from Excel, Google Sheet, CSV to PHP Grid

Importing from ExcelWe’ve released ‘Import Data’ feature that will help customers who need to migrate from Microsoft Excel or Google Sheets or CSV File to their own web based solution using PHP Grid Framework.

– Import your external CSV file data in PHP Grid Framework.
– Migrating from Excel or Google Sheets to PHP Grid Framework.
– Selection to map imported data columns on database fields.
– Allow to Append OR Replace existing PHP Grid data.

Screencast below:

For How-tos, usage and technical details, refer updated documentation.

Existing customers can request update from this link.
To purchase license, you can visit this link.