1. Go to this page and download the library: Download carrooi/no-grid library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
carrooi / no-grid example snippets
use Carrooi\NoGrid\DataSource\ArrayDataSource;
use Nette\Application\UI\Presenter;
class BooksPresenter extends Presenter
{
/** @var \Carrooi\NoGrid\INoGridFactory @inject */
public $gridFactory;
protected function createComponentBooksGrid()
{
$dataSource = new ArrayDataSource([ // Read more about data sources below
['title' => 'Lord of the Rings'],
['title' => 'Harry Potter'],
['title' => 'Narnia'],
]);
$grid = $this->gridFactory->create($dataSource);
return $grid;
}
}
$form = new Form;
$form->addText('name');
$form->addSubmit('search', 'Search!');
$grid->setFilteringForm($form);
// setting filters is not y to database
return '%'. $name. '%';
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.