Id Name Birthday Action
21 Ebony Bass Temple 15. 9. 1956
22 Uptight Unicorn 24. 4. 1998
23 Inbred Blood Conspiracy 23. 3. 1960
24 Real Thunder Saga 6. 12. 1940
25 Hungry Hummingbird 15. 12. 1976
26 Good Goose 23. 4. 1939
27 Unusual Unicorn 28. 4. 1939
28 Aggressive Angelfish 12. 3. 1951
29 Beautiful Boar 7. 7. 1987
30 Go Go Pogo All-Stars 10. 5. 2000
31 Rock 'n' Roll Metal Assassins 21. 3. 1966
32 Dr. Spelunking Kingdom 18. 9. 1999
33 Amused Alpaca 6. 8. 1941
34 World of Bubble Gone Wild 11. 10. 1969
35 Delightful Dove 3. 4. 1989
36 Anxious Ant 27. 10. 1986
37 Big-Time Chef Blast 25. 5. 1970
38 Rural Chocobo Journey 6. 1. 1989
39 Dynamite Go-Kart Superstar 17. 4. 1951
40 Sonic Monster of Magic 13. 2. 1963
( Items: 21 - 40 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;
}