PHP > Eyesis Data Grid Control

Example 1

PHP, AJAX, MYSQL in action .. DataGrid

The Eyesis Data Grid Control is all you need when it comes to displaying data from a MySQL database in tabular format. No flashy dynamic updating or complex Javascript, and no countless ambiguous classes cluttering up your project. This class is simple, small, feature packed, and easy to implement with only six lines of code, don’t believe me? Check out the examples below!

There are plenty of PHP data grid controls out there, but none that could satisfy me. I use data grids on almost every web site I develop. They come in great for displaying all kinds of data. I developed this data grid to suit all my needs and more.

A few of the features include: 

  • Filtering and searching capabilities
  • Ability to change column headers
  • Capable of displaying images
  • Ajax supported
  • Automatic row paging
  • Row selection
  • Supports MySQL database
  • Hide columns
  • Sort columns
  • Customizable look and feel through CSS
  • Can handle large data sets
  • Ability to add controls
  • Checkbox support
  • Specify column format types (such as percent, dollars, etc)
  • Tested working in Firefox 2 and 3, IE 6 and 7, Chrome, Safari 3, and Opera 9
  • PHP 5 only
  • Much more!

Create dynamic-easy-to-use data grid controls for your web site in seconds!

Example 1

The above datagrid is built in only 6 lines of code!

<?php
// file: ex1.php
require 'class.eyemysqladap.inc.php';
require 'class.eyedatagrid.inc.php'; 

// Load the database adapter
$db = new EyeMySQLAdap('localhost', 'root', '', 'people');

$dg = new EyeDataGrid($db); // Load the datagrid class
// Fetch all rows and columns from the `people` table
$dg->setQuery("*", "people");

// Print the table
$dg->printTable();

You can even make the above example Ajax enabled with 1 line of code!

<?php
// file: ex1-ajax.php
require 'class.eyedatagrid.inc.php'; 

// Just call one function and your table is now totally Ajax enabled!
EyeDataGrid::useAjaxTable('ex1.php');

Demos

Example 1 – Basic DataGrid [View] [Source]
Example 1.5 – Basic DataGrid WITH AJAX [View] [Source]
Example 2 – Filters, Headers, Column Types [View] [Source]
Example 3 – More Features [View] [Source]
Example 4 – Row Selection [View] [Source]
Example 5 – Full Featured Ajax Demo [View] [Source]

Download

eyedatagrid-1.1.zip 93kb, v1.1.6, Released: 03-Dec-08

quoted from: www.eyesis.ca

One thought on “PHP > Eyesis Data Grid Control

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s