Id Jméno Narozky Věk
561 Crazy Pogo Bastards 5. 11. 1993 31
562 Fantastic Turtle Odyssey 13. 3. 1943 81
563 Naughty Unicorn Inferno 6. 6. 1947 77
564 Yawning Yacare 17. 10. 1944 80
565 Cheerful Camel 10. 10. 1937 87
566 Musical Thief Boxing 16. 4. 1955 69
567 Lucky Lion 21. 6. 1959 65
568 Combative Chicken 6. 2. 1956 68
569 Gothic Mall Story 16. 2. 1941 83
570 Paranoid College Fiesta 17. 1. 1931 93
571 Defiant Dogfish 2. 11. 1977 47
572 Blue Barracuda 4. 2. 1970 54
573 Legend of Blade - The Dark Project 21. 10. 1955 69
574 Glorious Goose 26. 9. 1938 86
575 Envious Eel 1. 2. 1977 47
576 Innocent Iguana 17. 11. 1968 56
577 Profane Animal in the Outback 8. 9. 1949 75
578 Unbelievable Moped Jamboree 3. 9. 1968 56
579 Sleepy Swiftlet 7. 6. 1991 33
580 Nasty Barbarian vs. Capcom 14. 1. 1966 58
( Položky: 561 - 580 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;
}