Id Name Birthday Age
481 Pro Matador Stars 25. 9. 1993 31
482 Ultimate Porn Invaders 1. 10. 1961 63
483 Mushy Mosquito 6. 4. 1968 56
484 Ninja Unicycle Park 6. 10. 1967 57
485 Glowing Penguin Uprising 12. 8. 1946 78
486 Drug-Induced Football Uprising 23. 10. 1945 79
487 Muddy Macaque 16. 1. 1991 33
488 Maniac Castlevania Slaughter 2. 2. 1989 35
489 3D Amish Solid 2. 12. 1986 37
490 Fantastic Flatworm 2. 6. 1938 86
491 Poor Pony 9. 3. 1977 47
492 8-Bit Paintball Fiesta 28. 6. 1950 74
493 Handsome Hamster 15. 4. 1982 42
494 Ashamed Ape 11. 7. 1979 45
495 Mexican Bow Hunter Horde 4. 4. 1991 33
496 Lair of the Devil Syndrome 1. 9. 1965 59
497 Metal Robot - Hot Pursuit 19. 9. 1931 93
498 Enchanting Earthworm 19. 2. 2000 24
499 Tactical Makeover Mania 26. 11. 1990 33
500 Bloody Buffalo 12. 5. 1963 61
( Items: 481 - 500 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;
}