jueves, 1 de septiembre de 2011

Grid con php

Fuente: http://www.eyesis.ca/projects/datagrid.html

PHP > Eyesis Data Grid Control

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!
Check out HotScript:
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.phprequire 'class.eyemysqladap.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
// Print the table$dg->printTable();
You can even make the above example Ajax enabled with 1 line of code!
<?php// file: ex1-ajax.phprequire 'class.eyedatagrid.inc.php';
// Just call one function and your table is now totally Ajax enabled!EyeDataGrid::useAjaxTable('ex1.php');


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]


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

2 comentarios:

  1. hola: me gusta esta grilla, pero no veo como funciona a la hora de editar los registros, por ejemplo modificar campos de texto, modificar campos donde se escoja un valor de una lista, cambiar una fecha por medio de control calendario, se puede hacer eso?

    1. La verdad que ni idea, yo lo use muy poco. No lo personalize, es cuestion de probar.