Id Jméno Narozky Věk
601 Concerned Cheetah 3. 9. 1952 72
602 Joyous Jellyfish 9. 1. 1939 85
603 Savage Outlaw Rebellion 8. 4. 1971 53
604 Disgusted Dormouse 16. 6. 1999 25
605 Sore Stoat 8. 11. 1967 57
606 Helicopter Fantasy X 13. 12. 1984 39
607 Awful Alpaca 6. 11. 1995 29
608 Adventurous Armadillo 8. 1. 1972 52
609 Motionless Mongoose 23. 3. 1999 25
610 Grand Bow Hunter Terror 19. 4. 1979 45
611 Shy Starling 20. 3. 1966 58
612 Cautious Chimpanzee 28. 2. 1966 58
613 Christian Makeout DJ 26. 7. 1964 60
614 Troubled Tarantula 27. 2. 1986 38
615 Peaceful Death Onslaught 22. 10. 1934 90
616 Amish College EX 22. 11. 1948 76
617 The Sims: Moon - The Quickening 28. 9. 1946 78
618 Latino Death For Kids 18. 8. 1944 80
619 Yellowed Yak 28. 2. 1944 80
620 Frantic Fox 23. 6. 1971 53
( Položky: 601 - 620 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;
}