Id Name Birthday Age
41 Chinese Spelunking Battle 13. 5. 1943 80
42 Masters of the Programming Trilogy 18. 8. 1990 33
43 Depressing Sudoku Arena 18. 12. 1967 56
44 Merciless Nazi Strike Force 27. 5. 1964 59
45 Grimy Mall Gaiden 21. 9. 1992 31
46 Cute Constrictor 19. 10. 1938 85
47 Defeated Dove 26. 1. 1938 86
48 Talented Teira 22. 6. 1995 28
49 Grumpy Goldfinch 11. 4. 1983 40
50 Golden Cardboard Ultra 15. 12. 1939 84
51 Amazon Elevator Agent 22. 9. 1987 36
52 All-Star Cheese Dash 2. 7. 1983 40
53 Nutty Nightingale 10. 4. 1993 30
54 Defeated Dog 11. 6. 1997 26
55 Dull Dormouse 25. 10. 1967 56
56 Graceful Gazelle 27. 11. 1993 30
57 Precious Pig 24. 10. 1958 65
58 Special Chase Hop-A-Bout 28. 6. 1975 48
59 Smiling Sandpiper 14. 5. 1993 30
60 Yucky Yak 19. 10. 1995 28
( Items: 41 - 60 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;
}