Id Name Birthday Age
361 Sleepy Seal 24. 3. 1939 85
362 Allied Shopping Kingdom 1. 4. 1998 26
363 Deranged Sailor Brothers 23. 11. 1937 87
364 Tactical Barbarian - The Card Game 1. 2. 1971 53
365 Aero Jetski Assault 6. 11. 1942 82
366 Frisky Bongo Spectacular 22. 5. 1942 82
367 Smoggy Skylark 10. 2. 1982 42
368 Android Shadow Syndrome 21. 7. 1995 29
369 Death-Defying Basketball Troopers 21. 7. 1970 54
370 Fine Flamingo 17. 7. 1961 63
371 Gleaming Grasshopper 16. 4. 1942 82
372 Frail Fish 25. 4. 2000 24
373 Cthulhu Amish Fiesta 27. 2. 1937 87
374 Helpless Hare 6. 8. 1998 26
375 Clumsy Crayfish 8. 12. 1981 42
376 Brave Boar 1. 5. 1934 90
377 Atomic Cyborg Conflict 27. 5. 1963 61
378 Vivacious Vicuña 5. 7. 1951 73
379 Nasty Nightingale 5. 6. 1977 47
380 Testy Teira 1. 4. 1933 91
( Items: 361 - 380 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;
}