Id Jméno Narozky Věk
681 Phoenix Wright: Boxing Princess 20. 7. 1958 66
682 We Love Desert Blaster 7. 5. 1947 77
683 Intense Balloon Tale 28. 11. 1952 71
684 Thoughtful Toad 17. 6. 1957 67
685 Successful Stag 22. 3. 1957 67
686 Sore Starling 5. 4. 1954 70
687 Zombie Spelling on the Oregon Trail 22. 10. 1987 37
688 Generic Jackhammer of Love 23. 8. 1959 65
689 Tired Tapir 24. 3. 1969 55
690 Eco-Friendly Helicopter Pimps 28. 10. 1942 82
691 The Simpsons' Theme Park in Busytown 16. 3. 1955 69
692 Distinguished Cardboard vs. Capcom 18. 8. 1970 54
693 Dizzy Dingo 22. 7. 1967 57
694 Zany Zebra 1. 2. 1988 36
695 M.C. Escher Blimp Struggle 4. 6. 1979 45
696 Wrath of the Cardboard Bastards 19. 7. 1964 60
697 Children of the Manlove from Hell 7. 4. 1944 80
698 Dead Dolphin 24. 4. 1934 90
699 Cthulhu Godzilla Dudes 12. 6. 1978 46
700 Yucky Yacare 2. 6. 1930 94
( Položky: 681 - 700 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;
}