Id Name Birthday Age
521 Different Dotterel 22. 10. 1952 72
522 Ultimate Sword Collection 17. 12. 1987 36
523 Nice Newt 24. 10. 1945 79
524 Grumpy Gibbon 5. 9. 1970 54
525 BudgetSoft Presents: Fashion Revenge 8. 9. 1993 31
526 Custom Dating Extra 6. 12. 1953 70
527 Hindu Surf Project 26. 9. 1977 47
528 Sensual Toon Sisters 19. 4. 1972 52
529 Proud Pintail 13. 2. 1958 66
530 Grieving Goshawk 6. 10. 1959 65
531 Cautious Cardinal 14. 3. 1957 67
532 Fisher Price Handgun Scam 14. 2. 1941 83
533 Good Grouse 4. 9. 1943 81
534 Clean Chicken 7. 4. 1955 69
535 Courageous Caracal 10. 7. 1932 92
536 Aquatic Motocross Marines 16. 8. 1998 26
537 Interactive Biplane Palace 7. 10. 1989 35
538 Mexican Insect Warrior 28. 5. 1932 92
539 Odd Octopus 21. 9. 1944 80
540 Zany Desert Jam 25. 5. 1938 86
( Items: 521 - 540 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;
}