Id Name Birthday Action
661 German Cricket Groove 19. 9. 1988
662 Ho-Hum WWE Co-Op 25. 9. 1951
663 My First Fishing Bloodbath 28. 5. 1950
664 Indiana Jones and the Transvestite Madness 3. 6. 1963
665 Mushy Manx 2. 9. 1994
666 Magnificent Mink 16. 6. 1949
667 Open Oryx 2. 5. 1942
668 Galactic Scorched Earth Palace 19. 5. 1961
669 Pathetic Sandwich Boxing 10. 5. 1977
670 Master Chief Hammer Gone Wild 15. 4. 1978
671 Final Makeover Nightmare 15. 4. 1993
672 Muddy Mockingbird 12. 3. 1997
673 Zombie Batman Struggle 28. 9. 1948
674 Depressed Dugong 5. 12. 1994
675 The Care Bears' Business - 2nd Impact 7. 11. 1959
676 Delightful Duck 18. 1. 1988
677 Omega Hockey from Planet X 19. 9. 1965
678 Pro Robot in the Hood 17. 8. 1948
679 Magical Dating in the Magic Kingdom 8. 2. 1968
680 Amateur Yoga Crisis 2. 5. 1930
( Items: 661 - 680 from 1020 )
  See the code below 👇 or see GitHub
public function createComponentGrid(): DataGrid
{
	$grid = new DataGrid();

	$grid->setDataSource($this->dibiConnection->select('*')->from('users'));

	$grid->setItemsPerPageList([20, 50, 100], true);

	$grid->addColumnText('id', 'Id')
		->setSortable();

	$grid->addColumnText('email', 'E-mail')
		->setSortable()
		->setFilterText();

	$grid->addColumnText('name', 'Name')
		->setFilterText();

	$grid->addColumnDateTime('birth_date', 'Birthday')
		->setFormat('j. n. Y');

	$grid->setItemsDetail();

	$grid->setTemplateFile(__DIR__ . '/Templates/grid/item-detail-grid.latte');

	return $grid;
}