Id Jméno Narozky Věk
781 Xenophobic Xenomorph 23. 12. 1994 29
782 Expensive Eel 26. 12. 1975 48
783 French Chess in Crazyland 15. 5. 1942 82
784 Enthusiastic Eland 22. 11. 1992 32
785 The Secret Weapon of the Workout Joe 8. 8. 1968 56
786 Britney Spears' Cricket Horror 20. 2. 1955 69
787 Nihilistic Baseball Yoga 1. 4. 1950 74
788 Blazing Ostrich - Hot Pursuit 21. 5. 1992 32
789 Irish Kung-fu World Tour 3. 2. 1947 77
790 Claustrophobic Zamboni Hero 16. 6. 1990 34
791 Ultimate Motocross Interceptor 8. 11. 1960 64
792 Calm Cormorant 23. 11. 1990 34
793 Awful Antelope 5. 2. 1984 40
794 Tired Tortoise 24. 10. 1944 80
795 Exciting Afro Conspiracy 20. 4. 1975 49
796 Yellowed Yak 3. 3. 1993 31
797 Proud Pheasant 26. 12. 1954 69
798 Frightened Frog 4. 2. 1953 71
799 Dead or Alive Gun Online 8. 3. 1988 36
800 Day of the Lawnmower Creator 18. 12. 1963 60
( Položky: 781 - 800 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;
}