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.

Announcing PHP Grid Framework v2.6

Welcome to the release of PHP Grid Framework v2.6. There are a number of significant updates in this version that we hope you will like, some of the key highlights mentioned below.

Highlights:

Overall User Interface Enhancement, Font-awesome Icons, Shaded border, Tooltips

Optimized for mobile devices

Automatic hiding of columns on small device breakpoints

Enhanced Excel Style navigation, just like Google Sheets & MS Excel with no saving delay.

Added Tooltips where required. Added ellipses (…) for long content.

Lookup search, Numeric Range search, Global search

Lookup edit type

and it will result following searchable lookup dropdown.

Exporting single row (e.g. Sales receipts)

Predefined Search Templates

URL based grid filtering (filters permalink)

Directly Open Add Form, instead of grid

Read-only preset of grid (e.g. Reports) + Dark-One theme

Optimized Database drivers supported
db

And finally, great experience on modern browsers.
Browsers

 

Notable Fixes & Updates:

  • Selecting specific field to map on imported CSV file
  • Updated Excel export library included
  • Updated PDF export library included
  • Updated Database Abstraction library included
  • Important Security Fixes (XSS, SQL injection)
  • Added set_titles function to override titles
  • Added rowheight property to increase row space
  • Security: File upload File Extension Filtering
  • Excel mode: On enter move down or next
  • Replaced CKeditor with Trumbowyg editor due to licensing limits
  • Auto remove uploaded image on close and cancel dialog
  • Excel view: Textarea shift enter for new line
  • Around 200 fixes and updates.

Last but certainly not least, a big Thank You! to our customers who helped to make our product even better.

Next Actions:

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

 

 

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.

Laravel Datagrid Guide

Following is the guide to integrate PHP DataGrid with Laravel.

Step1: Folder placements in Laravel.

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

Copy the contents of lib/inc folder —> Laravel/app/Classes/phpgrid
Copy the contents of lib/js folder —> Laravel/js/phpgrid

laravel_step1_1

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 ‘phpgrid’ and move all contents of ‘lib/inc’ in it. Final result will look like this:

laravel_step1_2

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

laravel_step1_3

Step2: Setting Controller code.

Here we included our library and rest code looks same as in our demos. Note the ” before class name while instantiating object. Finally we passed the output of render() function to view with a variable name ‘phpgrid_output’.

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

Step2: Setting View code.

In view code, we included the JS/CSS files from the ‘js’ folder which we copied in step1.1
We also included a meta tag for ‘csrf-token‘, that is required by laravel for POST operations.

And using blade template variable output, we pushed the grid output in our desired place in html.
We also added a javascript code to pass CSRF-TOKEN in header request of ajax calls.


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

Step3: 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: PHP Grid Framework does not utilize ORM model layer of Laravel. It uses it’s own backend libraries.

Result: Editable Datagrid for Laravel 5.5!

Download all files to kick-start Laravel 5.5 with PHP Grid Framework.

Note: Demo comes with non-commercial / evaluation version of php grid framework. You can buy commercial license from 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.