Id Name Birthday Action
401 Summer Underwear Trivia 10. 5. 1974
402 Proud Pelican 18. 11. 1992
403 Victorious Vendace 25. 4. 1944
404 Innocent Ibis 5. 1. 1964
405 Tender Tern 9. 6. 1990
406 Odd Okapi 5. 5. 1957
407 Frail Frog 13. 2. 1965
408 Wooden Guitar Diesel 22. 10. 1950
409 Hip-Hop Vigilante Ultra 22. 11. 1964
410 The Last Cannibal Rebellion 8. 10. 1950
411 Raging Drug-Dealing Heroes 2. 1. 1988
412 Important Ibis 7. 11. 1995
413 Comfortable Corncrake 22. 11. 1931
414 We Love Banjo Crime Scene Investigation 11. 1. 1962
415 Samba de Mall from Outer Space 18. 12. 1933
416 Star Octopus Gladiator 4. 2. 1988
417 Transvestite Princess Fighter 19. 10. 1946
418 Dr. Spelling Alpha 3. 2. 1971
419 Bloody Bear 21. 3. 1936
420 Claustrophobic Afro Co-Op 6. 3. 1981
( Items: 401 - 420 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;
}