Id Jméno Narozky Věk
441 Uptight Unicorn 14. 7. 1958 66
442 Misty Macaque 17. 9. 1974 50
443 Imperial Hoedown Havoc 16. 8. 1959 65
444 Panicky Porpoise 8. 5. 1994 30
445 Attractive Alligator 10. 8. 1941 83
446 Joyous Jay 2. 8. 1998 26
447 Spectacular Thief in the Hood 6. 2. 1953 71
448 Big Stunt from Mars 23. 11. 1974 50
449 Masters of Beach School 2. 9. 1951 73
450 Disturbed Dog 14. 10. 1946 78
451 Horrible Horse 6. 10. 1995 29
452 Beautiful Driving Vengeance 18. 8. 1954 70
453 Lazy Breakdancing Challenge 24. 5. 1955 69
454 Super Spider 24. 12. 1963 60
455 Alive Ant 8. 4. 1954 70
456 Pleasant Platypus 4. 1. 1992 32
457 Hindu Frisbee in Space 5. 5. 2000 24
458 Rockin' Lego Patrol 8. 4. 1948 76
459 Better Barracuda 26. 3. 1939 85
460 Defeated Dugong 8. 11. 2000 24
( Položky: 441 - 460 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;
}