Id Name Birthday Age
981 Dwarven Bomberman Showdown 7. 7. 1942 82
982 Sleepy Stoat 10. 5. 1941 83
983 Busy Buzzard 24. 5. 1972 52
984 Calm Caterpillar 25. 12. 1979 44
985 M.C. Escher Bass Thieves 21. 9. 2000 24
986 My Little Punching vs. The Space Mutants 2. 7. 1998 26
987 The Muppets Computer EX 9. 6. 1932 92
988 Rad Bandicoot on Wheels 1. 2. 1973 51
989 God of Ninja Spree 8. 7. 1968 56
990 Filthy Fly 16. 1. 1977 47
991 Anxious Anteater 17. 1. 1952 72
992 Infinite Biplane in the Desert 18. 12. 1970 53
993 Smiling Seahorse 16. 2. 1947 77
994 Brave Beetle 23. 4. 1996 28
995 Testy Tern 13. 7. 1943 81
996 Modern Moth 21. 10. 1989 35
997 Faithful Ferret 2. 7. 1944 80
998 Helpless Hawk 28. 5. 1954 70
999 Enraged Internet Base 24. 2. 1998 26
1000 Wide-eyed Warbler 18. 12. 1977 46
( Items: 981 - 1000 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;
}