Id Name Birthday Age
601 Concerned Cheetah 3. 9. 1952 72
602 Joyous Jellyfish 9. 1. 1939 85
603 Savage Outlaw Rebellion 8. 4. 1971 53
604 Disgusted Dormouse 16. 6. 1999 25
605 Sore Stoat 8. 11. 1967 57
606 Helicopter Fantasy X 13. 12. 1984 39
607 Awful Alpaca 6. 11. 1995 29
608 Adventurous Armadillo 8. 1. 1972 52
609 Motionless Mongoose 23. 3. 1999 25
610 Grand Bow Hunter Terror 19. 4. 1979 45
611 Shy Starling 20. 3. 1966 58
612 Cautious Chimpanzee 28. 2. 1966 58
613 Christian Makeout DJ 26. 7. 1964 60
614 Troubled Tarantula 27. 2. 1986 38
615 Peaceful Death Onslaught 22. 10. 1934 90
616 Amish College EX 22. 11. 1948 76
617 The Sims: Moon - The Quickening 28. 9. 1946 78
618 Latino Death For Kids 18. 8. 1944 80
619 Yellowed Yak 28. 2. 1944 80
620 Frantic Fox 23. 6. 1971 53
( Items: 601 - 620 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;
}