Wednesday, May 9th, 2007

XAJAX PHP Live Datagrid

Category: Examples, JavaScript, PHP

Timothy Lorens has created a XAJAX PHP Live Datagrid that is as simple to setup as:

  1. <div id=“dataGrid” align=“center”></div>
  2. <script type=“text/javascript”>
  3.   xajax_showDataGrid();
  4. </script>

xajax_showDataGrid is a callback where you get to implement methods such as passing back how many rows there are, and the rows to show.

Xajax Data Grid

Posted by Dion Almaer at 6:49 am
18 Comments

+++--
3.7 rating from 184 votes

18 Comments »

Comments feed TrackBack URI

If you make the fields editable I would give you a 5 ;)

I like the clean implementation and speed of the table but I need to be able to edit the fields.

Comment by Alex93053 — May 9, 2007

Yet Another Live Datagrid

Comment by YALD — May 9, 2007

I love the grid and I would use it in a second but you have got to make the fields editable.

Comment by evan108108 — May 9, 2007

Yes, there are many live datagrids out there. The main idea behind this live datagrid is easy of use but most of all, the portability. The datagrids I’ve come across take a lot of work to implement into projects and if you wish to reuse it in a completely separate project, you have to do all that work again. The callback function is the meat of this datagrid. That’s really the only area changes need to be made— all in one spot– easy to maintain– easy to implement. wham-bam!

I intend on optimizing this code a bit and expanding it more to be a little more glamorous :) with resizable columns and the ability to edit fields (I actually need this functionality myself).

Thanks for checking it out!

Comment by Timothy — May 9, 2007

@Timothy: I am thankful for your efforts with the data grid. I’ve been using an editable data grid since I first saw one on Ajaxian about 2 years ago but never got around to “pimping” it by adding multibrowser support, filtering and all that good stuff. There are commercial solutions available that offer too many features and therefore create more problems than answers.

When you’re ready to release a final version, I’ll be more than happy to translate the readme.txt or online documentation into german. ;)

Comment by Alex — May 9, 2007

What I really find most astonishing about this datagrid is that it’s already in Cornflower blue!

Comment by Jerr Lovy — May 9, 2007

What are the key differences comparing with YUI or Dojo datagrids?

Comment by Nick — May 10, 2007

@Nick, Oh, I forgot to mention, YUI seems really awesome. But is also appears to me that YUI is a framework and something I don’t feel like getting ‘locked into’. I haven’t really disected YUI, so I can’t comment too much on it. As far as Dojo? Dojo is HUGE! When my HTML is 2k and the javascript is 130k just to draw a simple datagrid? That’s ridiculous! Tight, clean, fast code.

Use FireBug to profile your page load times and just how much data is being sent to the browser.

Maybe I’m too oldskewl back when we had to count our bits and bytes :P

Comment by Timothy — May 10, 2007

How to develop sorting functionality

Comment by Chakravarthy — May 12, 2007

i use xajax 0.24
but i cannot use it!?
.i dont know wt happen?

Comment by asdf913 — June 1, 2007

This guy did a better job. In place editing, sorting, search…however, try do to several grid in several pages…you’ll get bored as hell changing the same piece of code over and over again.

Someone must come up with an on demand grid…choose a table …wham…a nice grid.

Comment by tormented by ajax — June 21, 2007

forgot to put the link…sorry

http://jvelazqu.glo.org.mx/xajaxGrid/

Comment by tormented by ajax — June 21, 2007

I don’t see what all the craze is for inline-editing in a datagrid. And his code is a total wreck. My solution is based on portability and elegant code. Granted theres a few things here and there that can be cleaned up. But you’ll spend a few hours getting his solution to work in your framework. My solution doesn’t lock you into anything but Xajax. You can use whatever you want for a callback and you’re not spending hours and hours getting this thing to work WITH your code. :)

If you want an UBER-Leet Datagrid, then get yourself knee-deep in the Extended Yahoo! UI framework that Jack Slocum put together– because that datagrid he has ROCKS… http://www.jackslocum.com/blog/

Plus, I DO plan on adding extra functionality to my datagrid.

Comment by Timothy — July 27, 2007

Try phaajaxgrid http://freelancesoft.com.ar/phaajaxgrid/ is more simple and easy.

A PHP library by http://freelancesoft.com.ar that allows you to create html tables from a mysql database ( DataGrid ). Supports sorting, paging, inner joins, left joins right joins, where conditions, drop down lists in cells, customization by css, etc.
Published in sourceforge…

Comment by Martín — September 9, 2007

For a similar purpose, you can use http://genericselect.com for larger sets of database driven data.

Comment by bnovc — October 27, 2007

This is the best AJAX llive datagrid I’ve found ever

http://www.gurusistemas.com/indexdatagrid.php

Ahd the best… is free

Comment by snoopypiolin — March 15, 2008

Good class but lacks some useful features. Try this: http://www.eyesis.ca/projects/datagrid.html IMHO this is the best PHP ajax data grid control out there.

Comment by Drift — November 19, 2008

PHP datagrid component for JQGrid (based on JQuery). This library can generate fully featured CRUD application in record time.

include(“jqgrid.php”);
$g = new jqgrid();
$grid[“caption”] = “My Sample Grid”; // set grid customizable params
$g->set_options($grid);
$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
* Multiple Themes (ThemeRoller)
* and almost all features available for FREE … which cost $449 on official commercial license.

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

http://azgtech.wordpress.com/2010/08/01/jqgrid-php-datagrid-component-free/

Comment by azghanvi — August 3, 2010

Leave a comment

You must be logged in to post a comment.