Wednesday, May 9th, 2007
XAJAX PHP Live Datagrid
Timothy Lorens has created a XAJAX PHP Live Datagrid that is as simple to setup as:
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.













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.
Yet Another Live Datagrid
I love the grid and I would use it in a second but you have got to make the fields editable.
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!
@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. ;)
What I really find most astonishing about this datagrid is that it’s already in Cornflower blue!
What are the key differences comparing with YUI or Dojo datagrids?
@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
How to develop sorting functionality
i use xajax 0.24
but i cannot use it!?
.i dont know wt happen?
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.
forgot to put the link…sorry
http://jvelazqu.glo.org.mx/xajaxGrid/
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.
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…
For a similar purpose, you can use http://genericselect.com for larger sets of database driven data.
This is the best AJAX llive datagrid I’ve found ever
http://www.gurusistemas.com/indexdatagrid.php
Ahd the best… is free