Id Name Birthday Action
481 Pro Matador Stars 25. 9. 1993
482 Ultimate Porn Invaders 1. 10. 1961
483 Mushy Mosquito 6. 4. 1968
484 Ninja Unicycle Park 6. 10. 1967
485 Glowing Penguin Uprising 12. 8. 1946
486 Drug-Induced Football Uprising 23. 10. 1945
487 Muddy Macaque 16. 1. 1991
488 Maniac Castlevania Slaughter 2. 2. 1989
489 3D Amish Solid 2. 12. 1986
490 Fantastic Flatworm 2. 6. 1938
491 Poor Pony 9. 3. 1977
492 8-Bit Paintball Fiesta 28. 6. 1950
493 Handsome Hamster 15. 4. 1982
494 Ashamed Ape 11. 7. 1979
495 Mexican Bow Hunter Horde 4. 4. 1991
496 Lair of the Devil Syndrome 1. 9. 1965
497 Metal Robot - Hot Pursuit 19. 9. 1931
498 Enchanting Earthworm 19. 2. 2000
499 Tactical Makeover Mania 26. 11. 1990
500 Bloody Buffalo 12. 5. 1963
( Items: 481 - 500 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;
}