Table of contents

# Composer

Download this package using composer:

composer require ublaboo/datagrid
1

# Features

  • Pagination
  • Sorting by columns
  • Sortable (reorderable)
  • Items per page - configurable
  • Acceptable data sources:
    • Doctrine (QueryBuilder)
    • Doctrine (Collection)
    • Nextras (Collection)
    • Dibi (DibiFluent)
    • Dibi (DibiFluent) for MS-SQL
    • Nette\Database (Please see it's documentation here (opens new window))
    • Nette\Database\Table
    • Nette\Database\Table (for MS-SQL)
    • Nette\Database\Table (for PostreSQL)
    • Array
    • Elasticsearch (Please see the documentation here (opens new window))
    • Remote Api
    • Any other class that implements IDataSource
  • Columns (custom templates, custom, renderer, replacement, inline editing):
    • ColumnText
    • ColumnNumber
    • ColumnLink
    • ColumnDateTime
    • ColumnStatus
  • Filtering: (custom templates, remembering state):
    • FilterText (multiple columns search)
    • FilterSelect
    • FilterRange
    • FilterDateRange
    • FilterDate
    • FilterMultiSelect
  • Actions
  • Item detail
  • Extendable datagrid template
  • Group actions (one/two level select)
  • Exports (filtered or not-filtered)
  • CSV Export ready
  • Tree view (children loaded via ajax)
  • Localization
  • Row conditions
  • Hideable columns
  • Ajax spinners

Datagrid can do some really useful stuff.

Let's create a datagrid component! We will demonstrate our examples in Presenters.

use Contributte\Datagrid\Datagrid;

class SimplePresenter extends BasePresenter
{

	public function createComponentSimpleGrid($name)
	{
		$grid = new Datagrid($this, $name);

		$grid->setDataSource($this->db->select('*')->from('example'));
		$grid->addColumnText('name', 'Name');
	}

}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

And that's it. Go check the app. 😃