PHPackages                             imt/data-grid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. imt/data-grid

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

imt/data-grid
=============

This library provides a simple, powerful and fully customizable tool for generating data-bound grids

0.9.0(13y ago)52471MITPHPPHP &gt;=5.3.2

Since Jun 17Pushed 11y ago1 watchersCompare

[ Source](https://github.com/IgorTimoshenko/IMTDataGrid)[ Packagist](https://packagist.org/packages/imt/data-grid)[ Docs](http://github.com/IgorTimoshenko/IMTDataGrid)[ RSS](/packages/imt-data-grid/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (6)Versions (2)Used By (1)

[![Build Status](https://camo.githubusercontent.com/b0f98a51072f5afb43283d32b65719acbc0baf0205250af0150f182837155d4f/68747470733a2f2f7472617669732d63692e6f72672f49676f7254696d6f7368656e6b6f2f494d5444617461477269642e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/IgorTimoshenko/IMTDataGrid)[![Coverage Status](https://camo.githubusercontent.com/fb031f970785b14612fc0beff9723f4132f7626c08cdcc92c7f00690a4a2eec0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f49676f7254696d6f7368656e6b6f2f494d5444617461477269642f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/IgorTimoshenko/IMTDataGrid)[![Dependencies Status](https://camo.githubusercontent.com/37f5cc03fbd21d53a13ff117bdc9a8918956871f0cbb9f8b2cd51897609a0b91/68747470733a2f2f646570656e64696e672e696e2f49676f7254696d6f7368656e6b6f2f494d5444617461477269642e706e67)](http://depending.in/IgorTimoshenko/IMTDataGrid)

IMTDataGrid
===========

[](#imtdatagrid)

Overview
--------

[](#overview)

This library provides a simple, powerful and fully customizable tool for binding grids on the client-side with data on the server. The library does not provide any tools for rendering grids on the client-side. So you pick yourself library that will render grids on the client-side (one of the such libraries is [jqGrid](http://github.com/tonytomov/jqGrid)). However, the library provides the opportunity to create an object of the grid, which contains the name, options, and a collection of columns. Therefore, you can use this object in order to simplify rendering grids on the client-side.

Installation
------------

[](#installation)

### 1. Using Composer (recommended)

[](#1-using-composer-recommended)

To install `IMTDataGrid` with [Composer](http://getcomposer.org) just add the following to your `composer.json` file:

```
{
    "require": {
        "imt/data-grid": "0.9.*"
    }
}
```

Then, you can install the new dependencies by running Composer's update command from the directory where your `composer.json` file is located:

```
$ php composer.phar update imt/data-grid
```

Now, Composer will automatically download all required files, and install them for you.

Usage
-----

[](#usage)

Suppose you are building a simple blog and you need to have the grid on the back-end, which will display information about the posts.

> It is further assumed that you are going to use the jqGrid library for rendering grids on the client-side, as well as [Doctrine ORM](http://github.com/doctrine/doctrine2) as the data source.

To get started, you need to construct an object that will reflect the grid with information about the posts. In order to construct this object you need to create the grid builder that will be responsible for creation of the grid:

```
