Id Name Birthday Action
841 Grotesque Gull 13. 4. 1962
842 Blasphemous Thunder Conquest 18. 10. 1981
843 Impossible Impala 13. 3. 1936
844 Political Sandwich Hunt 7. 8. 1995
845 Russian Disco Groove 23. 11. 1987
846 Impossible Impala 28. 2. 1986
847 Epic Ice Cream Pioneer 19. 8. 1987
848 Powerful Piranha 5. 5. 1941
849 Selfish Seal 8. 4. 1950
850 Obnoxious Ox 9. 10. 1976
851 Important Impala 2. 6. 1969
852 Amused Angelfish 6. 12. 1991
853 Obedient Ocelot 21. 8. 1944
854 Wide-eyed Worm 15. 6. 1996
855 Kabuki Biplane Shack 12. 3. 1949
856 Handsome Hedgehog 28. 7. 1995
857 Lazy Lapwing 27. 7. 1939
858 Hitler Software Overdrive 11. 1. 1972
859 The Castle of Aerobics Warfare 4. 11. 1960
860 Tired Tortoise 12. 5. 1939
( Items: 841 - 860 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;
}