Id Name Birthday Age
781 Xenophobic Xenomorph 23. 12. 1994 29
782 Expensive Eel 26. 12. 1975 48
783 French Chess in Crazyland 15. 5. 1942 82
784 Enthusiastic Eland 22. 11. 1992 32
785 The Secret Weapon of the Workout Joe 8. 8. 1968 56
786 Britney Spears' Cricket Horror 20. 2. 1955 69
787 Nihilistic Baseball Yoga 1. 4. 1950 74
788 Blazing Ostrich - Hot Pursuit 21. 5. 1992 32
789 Irish Kung-fu World Tour 3. 2. 1947 77
790 Claustrophobic Zamboni Hero 16. 6. 1990 34
791 Ultimate Motocross Interceptor 8. 11. 1960 64
792 Calm Cormorant 23. 11. 1990 34
793 Awful Antelope 5. 2. 1984 40
794 Tired Tortoise 24. 10. 1944 80
795 Exciting Afro Conspiracy 20. 4. 1975 49
796 Yellowed Yak 3. 3. 1993 31
797 Proud Pheasant 26. 12. 1954 69
798 Frightened Frog 4. 2. 1953 71
799 Dead or Alive Gun Online 8. 3. 1988 36
800 Day of the Lawnmower Creator 18. 12. 1963 60
( Items: 781 - 800 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->addColumnNumber('age', 'Age')
		->setRenderer(fn (Row $row): ?int => DateTime::fromSafe($row->asDateTime('birth_date'))?->diff(new DateTime())->y);

	return $grid;
}