Id Name Birthday Action
601 Concerned Cheetah 3. 9. 1952
602 Joyous Jellyfish 9. 1. 1939
603 Savage Outlaw Rebellion 8. 4. 1971
604 Disgusted Dormouse 16. 6. 1999
605 Sore Stoat 8. 11. 1967
606 Helicopter Fantasy X 13. 12. 1984
607 Awful Alpaca 6. 11. 1995
608 Adventurous Armadillo 8. 1. 1972
609 Motionless Mongoose 23. 3. 1999
610 Grand Bow Hunter Terror 19. 4. 1979
611 Shy Starling 20. 3. 1966
612 Cautious Chimpanzee 28. 2. 1966
613 Christian Makeout DJ 26. 7. 1964
614 Troubled Tarantula 27. 2. 1986
615 Peaceful Death Onslaught 22. 10. 1934
616 Amish College EX 22. 11. 1948
617 The Sims: Moon - The Quickening 28. 9. 1946
618 Latino Death For Kids 18. 8. 1944
619 Yellowed Yak 28. 2. 1944
620 Frantic Fox 23. 6. 1971
( Items: 601 - 620 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;
}