Id Name Birthday Action
941 Jack Thompson Hang Glider Sisters 6. 6. 1940
942 Jolly Jackal 1. 8. 1964
943 Bad Bat 25. 10. 1959
944 Real Rook 3. 2. 1971
945 Ingenious Programming Domination 23. 11. 1965
946 Musical Paintball Punishment 8. 8. 1985
947 Japanese Boxing Knights 25. 11. 1952
948 Distinct Dormouse 15. 8. 1967
949 Upset Unicorn 20. 10. 1981
950 Testy Tapir 4. 1. 1934
951 Final Sunshine Dash 8. 2. 1931
952 Innocent Impala 8. 2. 1961
953 Puzzled Penguin 11. 1. 1961
954 Fair Falcon 1. 9. 1968
955 Jolly Jellyfish 11. 8. 1946
956 Famous Fly 28. 8. 1988
957 Tender Tarsier 10. 7. 1941
958 Gentle Goosander 1. 12. 1972
959 The Last Karaoke from Mars 15. 4. 1975
960 Unsightly Unicorn 23. 2. 1963
( Items: 941 - 960 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;
}