Id Name Birthday Age
661 German Cricket Groove 19. 9. 1988 36
662 Ho-Hum WWE Co-Op 25. 9. 1951 73
663 My First Fishing Bloodbath 28. 5. 1950 74
664 Indiana Jones and the Transvestite Madness 3. 6. 1963 61
665 Mushy Manx 2. 9. 1994 30
666 Magnificent Mink 16. 6. 1949 75
667 Open Oryx 2. 5. 1942 82
668 Galactic Scorched Earth Palace 19. 5. 1961 63
669 Pathetic Sandwich Boxing 10. 5. 1977 47
670 Master Chief Hammer Gone Wild 15. 4. 1978 46
671 Final Makeover Nightmare 15. 4. 1993 31
672 Muddy Mockingbird 12. 3. 1997 27
673 Zombie Batman Struggle 28. 9. 1948 76
674 Depressed Dugong 5. 12. 1994 29
675 The Care Bears' Business - 2nd Impact 7. 11. 1959 65
676 Delightful Duck 18. 1. 1988 36
677 Omega Hockey from Planet X 19. 9. 1965 59
678 Pro Robot in the Hood 17. 8. 1948 76
679 Magical Dating in the Magic Kingdom 8. 2. 1968 56
680 Amateur Yoga Crisis 2. 5. 1930 94
( Items: 661 - 680 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;
}