Id Name Birthday Age
1 Charming Chicken 23. 2. 1982 40
2 Intellectual Bubble Disaster 2. 1. 1997 25
3 Crazy Copperhead 21. 5. 1955 67
4 Difficult Deer 23. 5. 1964 58
5 Underground Harpoon Gladiator 23. 8. 1939 82
6 Anxious Alpaca 25. 9. 1985 36
7 Misty Meerkat 11. 3. 1974 48
8 Funky Chainsaw of Mystery 23. 5. 1946 76
9 Sid Meier Deer Hunter Hoedown 20. 4. 1944 78
10 Terrible Karaoke of Mystery 10. 4. 1981 41
11 Joyous Jaguar 19. 9. 1994 27
12 Silly Sheep 19. 1. 1936 86
13 Grumpy Gerenuk 27. 9. 1978 43
14 Glorious Gaur 15. 12. 1977 44
15 Xenophobic Xenomorph 3. 3. 1987 35
16 Relieved Rhinoceros 11. 2. 1945 77
17 Bad Buzzard 8. 3. 1983 39
18 Dangerous Dolphin 28. 4. 1931 91
19 Quaint Quoll 27. 10. 1949 72
20 Thoughtless Turkey 14. 8. 1941 80
( Items: 1 - 20 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;
}