Id Name Birthday Action
881 Android Piano Derby 25. 4. 1963
882 Nihilistic Scooter Hell 8. 10. 1948
883 Confused Curlew 27. 2. 1997
884 Jealous Jaguar 19. 9. 1977
885 Careful Cod 12. 7. 1996
886 Strange Shrike 1. 1. 1955
887 Scary Swiftlet 28. 8. 1988
888 Everybody Hates the Sumo Princess 15. 10. 1995
889 Puzzled Pigeon 26. 9. 1939
890 Maniac Paintball Rave 25. 2. 1988
891 Ugliest Unicorn 6. 6. 1941
892 Samurai Whale Underground 11. 9. 1983
893 Wild Worm 11. 12. 1994
894 Impossible Ibex 2. 7. 1943
895 Thankful Tarantula 5. 8. 1960
896 Happy Herring 20. 10. 1954
897 Embarrassed Eel 17. 12. 1934
898 Unpleasant Mushroom Corps 28. 3. 1933
899 Dizzy Dove 12. 12. 1969
900 The Six Million Dollar Whale Baseball 18. 10. 1998
( Items: 881 - 900 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;
}