Id Jméno Narozky Věk
741 Unpleasant Fencing Epidemic 15. 5. 1977 47
742 Space Music Underworld 14. 12. 1961 62
743 Day of the Chase Strikes Again 12. 10. 1934 90
744 Screaming Lawnmower School 2. 12. 1976 47
745 Worried Wryneck 12. 6. 1995 29
746 Victorious Vicuña 11. 4. 1992 32
747 Third-World Dog Smash 28. 11. 1981 42
748 Aero Outlaw of Mystery 10. 9. 1982 42
749 Street STD Summit 13. 4. 1965 59
750 Happy Batman Roundup 10. 4. 1942 82
751 Perfect Piranha 27. 9. 1930 94
752 Colorful Constrictor 4. 1. 1961 63
753 Hurt Hedgehog 17. 6. 1946 78
754 Shameful Sunshine III 24. 3. 1990 34
755 Unusual Unicorn 24. 8. 1963 61
756 Thankful Tern 16. 2. 1948 76
757 Fruity Acid Revisited 28. 7. 1947 77
758 Talented Teira 3. 8. 1937 87
759 My Very Own Army Forever 25. 2. 1957 67
760 Vast Vicuña 20. 8. 2000 24
( Položky: 741 - 760 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;
}