Over the past month I have been working on integrating the jQuery Grid Plugin jqGrid into Zend Framework, for mostly internal use on company logistics systems. If you haven’t used jqGrid before, its a client-side AJAX grid based on JQuery with a staggering feature set covering everything you could imagine, just to name a few paging, sorting, searching, row editing, subgrids and more.
This release has only been possible with the kind permission from Warrant Group Ltd, to publish the code and give back to Zend Framework community. Especially after the proposal for ZendX_JQuery_JqGrid has laid dorment for nearly a year now, it was time to give this a slight nudge.
Also would just like to say thanks to Benjamin Eberlei for the creating the ZendX_JQuery libraries, it has been an absolute pleasure to work with your code.
Download
This library is currently in ALPHA and is not being used in production, but in the true style of Agile Development i am going to release early and often, the PHPunit tests, documentation and a new draft of a proposal for Zend Framework will come soon.
Example
<?php
class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
$books = array(
array( 'title' => 'PHP Objects, Patterns, and Practice (2nd edition)',
'author' => 'Matt Zandstra',
'purchased' => '2006-05-01'),
array( 'title' => 'Patterns of Enterprise Application Architecture',
'author' => 'Martin Fowler',
'purchased' => '2007-08-10'),
array( 'title' => 'Domain Driven Design: Tackling Complexity in the Heart of Software',
'author' => 'Eric Evans',
'purchased' => '2009-02-06')
);
$grid = new Ingot_JQuery_JqGrid('bookshelf',
new Ingot_JQuery_JqGrid_Adapter_Array($books));
$grid->addColumn(new Ingot_JQuery_JqGrid_Column('title'));
$grid->addColumn(new Ingot_JQuery_JqGrid_Column('author'));
$grid->addColumn(new Ingot_JQuery_JqGrid_Column('purchased'));
$grid->registerPlugin(new Ingot_JQuery_JqGrid_Plugin_ToolbarFilter());
$this->view->grid = $grid->render();
}
}




