PHP Datagrid Component


UPDATE (19th Oct 2018): Released 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.


  • 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
  • And finally, great experience on modern 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.

Get it from main PHP Grid website.

UPDATE (17th July, 2016): New Feature Updates

  • Custom Forms with PHP Grid 
  • PHP Database Table Editor v2.0 
  • Announcing PHP Grid v2.0 
  • Multiple Files Uploading 

Visit official  website for more

See Video of New feature & Interface!

jqGrid is an Ajax-enabled JavaScript control that provides solutions for representing and manipulating tabular data on the web. Since the grid is a client-side solution loading data dynamically through Ajax callbacks, it can be integrated with any server-side technology, including PHP.

Here i’ve made a self-written PHP Ajax Data Grid component using JQGrid (based on JQuery). This library can generate fully featured CRUD application in record time.


$g = new jqgrid();
$grid["caption"] = "My Sample Grid"; // set grid customizable params
$g->table = "tags"; // db table for CRUD operations.

// You can also specify SQL query for displaying data (download code with examples)
// $g->select_command = "select f1,f2,f3 from tags";

$out = $g->render("my_grid_1"); // render grid

... and in HTML after including JS files ...

This code will result in fully functional Jquery Grid (JqGrid) with …

  • Add
  • Edit
  • Delete
  • Search
  • Auto-filter
  • Sort
  • Pagination
  • Export
  • Multilevel Subgrid option (n-level)
  • Events for Add/Update/Delete Custom implementation
  • Multiple Themes (ThemeRoller)
  • and almost all features available for FREE … which cost $299 on official commercial license.
  • No time limitation

* Bold features are added in update of 5th October.

This component is highly customizable using option parameters, which can be added as needed.


UPDATE: 5th October, 2010

Following features are now incorporated in free version …

1. Sub-Grid/ Master Detail support

And it is available with all main operations … like search/add/edit/delete/sort/paging etc. You can have multi-level subgrids.

JQGrid Subgrid & Master Detail Example
JQGrid Subgrid & Master Detail Example

2. Custom Events Support

Now you can write you own custom implementations on UPDATE / INSERT / DELETE.

E.g. code …

// params are array(<function-name>,<class-object> or <null-if-global-func>,<continue-default-operation>)

$e[“on_insert”] = array(“add_client”, null, false);

$e[“on_update”] = array(“update_client”, null, true);

$e[“on_delete”] = array(“delete_client”, null, true);


UPDATE: 2nd November, 2010

Several fixes are incorporated in latest version. Please get your latest copy.

* Support for formatters e.g.

$col[“formatter”] = “date”; // format as date

$col[“formatoptions”] = array(“srcformat”=>’Y-m-d’,”newformat”=>’d/m/Y’); // format as date

* Cell editing navigation support,  like excel

* Table alias fields are fixed

* Enabled support for GROUP BY custom query

* Export excel fix for ? based url

Free version has no time limitation, but source code is encrypted or encoded.

Need Customization or Technical Support?

– You can get complete source code and subscription for priority support and updates from this link

Download free version with usage example

UPDATE (15th Jan, 2013): New featured examples include Custom toolbar button, Export to CSV, Date Time picker control, Open grid in edit mode by default, Added more themes (24 total), Add Data Grouping example + updated documentation. Visit official  website for more

Product now got a new home ‘‘ with a new version 1.4.6. Refer this site for all future updates.

  1. Charfeddine says:

    hi ,
    I want to add Export option to my web site please what shoud i do ????

  2. mihai jiros says:

    i interesting the full code for multi-level subgrids””
    i need to make a database with:
    id_company, company, vat nr, adres, name, email etc
    end id_company, employers, cnp, date, adres, tel, nr_social etc.
    and i need to print, end generate pdf file
    for company a need to make users to access this information
    for a each company i will select an employers and for each employer to print diferent reports
    i want to pay this 50& for the program

    best regardes
    mihai jiros

  3. Does your grid with full source code support or can be run on sql server database?

  4. kidsofts says:

    how to attach a new query

    $g->select_command = “SELECT * FROM (SELECT, invdate ,,

    $var = $_post[‘txtClientID’];
    $g->select_command = “SELECT * FROM (SELECT, invdate ,,
    i.note,, IF(i.closed=’No’,’Not Booked’,IF(i.closed=’Yes’,’Yes it is Booked’,’n/a’)) as closed FROM invheader i
    INNER JOIN clients c ON c.client_id = i.client_id and c.clint_id “. $var.”) o”;
    $g->select_command = “SELECT * FROM (SELECT, invdate ,,
    i.note,, IF(i.closed=’No’,’Not Booked’,IF(i.closed=’Yes’,’Yes it is Booked’,’n/a’)) as closed FROM invheader i
    INNER JOIN clients c ON c.client_id = i.client_id) o”;

    how can i attach a query data from a form

  5. raja says:

    how to run in the grid

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s