Id Jméno Narozky Věk
981 Dwarven Bomberman Showdown 7. 7. 1942 82
982 Sleepy Stoat 10. 5. 1941 83
983 Busy Buzzard 24. 5. 1972 52
984 Calm Caterpillar 25. 12. 1979 44
985 M.C. Escher Bass Thieves 21. 9. 2000 24
986 My Little Punching vs. The Space Mutants 2. 7. 1998 26
987 The Muppets Computer EX 9. 6. 1932 92
988 Rad Bandicoot on Wheels 1. 2. 1973 51
989 God of Ninja Spree 8. 7. 1968 56
990 Filthy Fly 16. 1. 1977 47
991 Anxious Anteater 17. 1. 1952 72
992 Infinite Biplane in the Desert 18. 12. 1970 53
993 Smiling Seahorse 16. 2. 1947 77
994 Brave Beetle 23. 4. 1996 28
995 Testy Tern 13. 7. 1943 81
996 Modern Moth 21. 10. 1989 35
997 Faithful Ferret 2. 7. 1944 80
998 Helpless Hawk 28. 5. 1954 70
999 Enraged Internet Base 24. 2. 1998 26
1000 Wide-eyed Warbler 18. 12. 1977 46
( Položky: 981 - 1000 z 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);

	$translator = new SimpleTranslator([
		'contributte_datagrid.no_item_found_reset' => 'Žádné položky nenalezeny. Filtr můžete vynulovat',
		'contributte_datagrid.no_item_found' => 'Žádné položky nenalezeny.',
		'contributte_datagrid.here' => 'zde',
		'contributte_datagrid.items' => 'Položky',
		'contributte_datagrid.all' => 'všechny',
		'contributte_datagrid.from' => 'z',
		'contributte_datagrid.reset_filter' => 'Resetovat filtr',
		'contributte_datagrid.group_actions' => 'Hromadné akce',
		'contributte_datagrid.show_all_columns' => 'Zobrazit všechny sloupce',
		'contributte_datagrid.hide_column' => 'Skrýt sloupec',
		'contributte_datagrid.action' => 'Akce',
		'contributte_datagrid.previous' => 'Předchozí',
		'contributte_datagrid.next' => 'Další',
		'contributte_datagrid.choose' => 'Vyberte',
		'contributte_datagrid.execute' => 'Provést',

		'Name' => 'Jméno',
		'Birthday' => 'Narozky',
		'Age' => 'Věk',
	]);

	$grid->setTranslator($translator);

	return $grid;
}