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