Id Jméno Narozky Věk
61 Blocky Octopus Horde 10. 10. 1945 79
62 Little Hang Glider Tournament 13. 7. 1960 64
63 Fine Flatworm 27. 12. 1945 78
64 Underground Chess Feud 19. 7. 1936 88
65 Irritating Blood of the Deep 5. 12. 1974 49
66 Dangerous Buddhist in the Salad Kingdom 20. 11. 1985 39
67 Terrible Teira 25. 5. 1986 38
68 Mexican Hair Salon in the Hood 5. 8. 1934 90
69 Depressed Dogfish 21. 4. 1981 43
70 First-Person Snowboard Rider 10. 5. 1973 51
71 Underwater Shopping Football 12. 1. 1963 61
72 Glamorous Gemsbok 16. 10. 1974 50
73 New Bow Hunter Thieves 13. 7. 1984 40
74 Nuclear Dating Special Edition 4. 7. 1935 89
75 Awesome Mummy Annihilation 8. 12. 1957 66
76 Irresistible Fire Psychiatrist 21. 11. 1956 68
77 Ill Iguana 9. 4. 1996 28
78 Wide-eyed Walrus 27. 9. 1943 81
79 Grumpy Goldfinch 26. 3. 1937 87
80 Helpful Hippopotamus 24. 9. 1951 73
( Položky: 61 - 80 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;
}