Id Name Birthday Action
801 Strange Seahorse 19. 4. 1973
802 Battle Buddhist Massacre 18. 12. 1971
803 Adventurous Angelfish 18. 10. 1996
804 Viking Cricket Extra 17. 6. 1985
805 Lair of the Gun Championship 23. 5. 1933
806 Tropical Catapult Strikes Back 27. 12. 1991
807 Shiny Salamander 5. 3. 1959
808 Unsightly Unicorn 4. 6. 1996
809 Disturbed Dingo 16. 5. 1977
810 Tense Thrush 20. 1. 1955
811 Arcane Jetpack Frenzy 20. 3. 1972
812 Xerothermic Xenomorph 2. 1. 1940
813 Alive Anteater 2. 3. 1999
814 Bonk Spatula in Vegas 2. 9. 1931
815 Light Llama 13. 11. 1961
816 Average Anaconda 14. 5. 1941
817 Dance Dance Night City 7. 12. 1931
818 Jolly Jellyfish 6. 11. 1950
819 Energetic Elk 4. 3. 1982
820 Atomic Carnival X 21. 1. 1960
( Items: 801 - 820 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;
}