Id Jméno Narozky Věk
701 Rich Raccoon 2. 7. 1972 52
702 Elated Eland 14. 8. 1998 26
703 Frantic Flatworm 15. 2. 1976 48
704 Grieving Gnat 9. 7. 1987 37
705 Itchy Ibex 4. 6. 1988 36
706 Lair of the Tank Police 11. 10. 1957 67
707 Ancient Chocobo Disaster 24. 9. 1935 89
708 Tactical Hitman Power 17. 9. 1998 26
709 Communist Mahjong Agent 12. 7. 1996 28
710 Curse of the Mafia DJ 25. 3. 1935 89
711 Dangerous Matador Competition 14. 7. 1938 86
712 Beautiful Transvestite Machine 10. 2. 1930 94
713 Happy Hawk 21. 2. 1950 74
714 Cute Cormorant 23. 4. 1930 94
715 Interstellar Toon Tale 9. 12. 1973 50
716 Jittery Jackal 4. 11. 1936 88
717 Leisure Suit Grizzly Bear - Total War 22. 11. 1976 48
718 Curious Crossbill 15. 7. 1991 33
719 Yellowed Yak 23. 8. 1931 93
720 Catholic Pokemon 3D 7. 11. 1951 73
( Položky: 701 - 720 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;
}