Id Name Birthday Age
961 Happy Blood Extravaganza 22. 10. 1936 88
962 Frankenstein Toon Explorer 13. 7. 1942 82
963 Maniac Vocabulary Inspector 22. 3. 1981 43
964 College Alien Task Force 24. 3. 1955 69
965 Shiny Shrike 12. 4. 1935 89
966 Healthy Horse 19. 11. 1935 89
967 Misty Manatee 1. 11. 1959 65
968 Disney Night Conflict 11. 4. 1930 94
969 Blazing Jackhammer Crusader 23. 5. 1986 38
970 Victorious Vendace 18. 3. 1985 39
971 Panzer Gun Bandits 16. 4. 1956 68
972 Fierce Frog 3. 4. 1989 35
973 Bling Bling Skate Crusader 24. 10. 1991 33
974 Average Albatross 22. 7. 1941 83
975 Twisted Deer Hunter Posse 6. 1. 1985 39
976 Intellectual Spelling Warfare 27. 10. 1942 82
977 Exquisite Quiz Roundup 12. 6. 1970 54
978 All-Star Bible Kid 24. 6. 1930 94
979 Mysterious Monkey 2. 8. 1952 72
980 Curious Capybara 5. 5. 1930 94
( Items: 961 - 980 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;
}