Id Name Birthday Age
981 Dwarven Bomberman Showdown 7. 7. 1942 81
982 Sleepy Stoat 10. 5. 1941 82
983 Busy Buzzard 24. 5. 1972 51
984 Calm Caterpillar 25. 12. 1979 44
985 M.C. Escher Bass Thieves 21. 9. 2000 23
986 My Little Punching vs. The Space Mutants 2. 7. 1998 25
987 The Muppets Computer EX 9. 6. 1932 91
988 Rad Bandicoot on Wheels 1. 2. 1973 51
989 God of Ninja Spree 8. 7. 1968 55
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 27
995 Testy Tern 13. 7. 1943 80
996 Modern Moth 21. 10. 1989 34
997 Faithful Ferret 2. 7. 1944 79
998 Helpless Hawk 28. 5. 1954 69
999 Enraged Internet Base 24. 2. 1998 26
1000 Wide-eyed Warbler 18. 12. 1977 46
( Items: 981 - 1000 from 1000 )
  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(function (Row $row): int {
			return $row['birth_date']->diff(new DateTime())->y;
		});

	return $grid;
}