Id Name Birthday Age
541 Frail Finch 17. 2. 1942 82
542 Magnificent Mamba 21. 6. 1935 89
543 Itchy Impala 24. 11. 1977 47
544 Exquisite Furry Online 25. 4. 1997 27
545 Defiant Deer 18. 2. 1947 77
546 Final Arcade in the Bayou 11. 4. 1948 76
547 Brainy Beaver 10. 5. 1947 77
548 Graceful Gorilla 8. 9. 1978 46
549 Annoying Antelope 8. 3. 1982 42
550 Inexpensive Iguana 14. 7. 1975 49
551 Amazing Whale Brothers 6. 4. 1958 66
552 Joyous Jackal 21. 5. 1992 32
553 Thankful Tarantula 11. 8. 1985 39
554 Insane Axe School 16. 12. 1946 77
555 Arrogant Armadillo 2. 3. 1978 46
556 Armored Skate Plus 17. 11. 1979 45
557 Barbie Fighter Alpha 27. 4. 1978 46
558 Odd Otter 6. 8. 1979 45
559 Sparkling Snail 6. 2. 1960 64
560 Defiant Dugong 22. 1. 1945 79
( Items: 541 - 560 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;
}