Id Jméno Narozky Věk
421 Educational Viking School 4. 7. 1940 84
422 Cloudy Cardinal 18. 1. 1973 51
423 Uptight Unicorn 4. 9. 1983 41
424 Famous Flatworm 20. 10. 2000 24
425 Bewildered Bee 15. 4. 1965 59
426 Romantic Elevator - 2nd Impact 9. 6. 1961 63
427 The Care Bears' Bungie Lord 22. 12. 1968 55
428 Thankful Tapir 5. 4. 1935 89
429 Difficult Dotterel 22. 9. 1959 65
430 Hazardous Whale On The Road 14. 4. 1991 33
431 Internet Raccoon Carnage 3. 6. 1935 89
432 Jealous Jaguar 4. 1. 1949 75
433 Hidden Werewolf Fantasy 8. 9. 1974 50
434 Dull Dormouse 2. 6. 1966 58
435 NBA Disco Temple 25. 10. 1993 31
436 Eager Eagle 11. 5. 1957 67
437 Witty Wolverine 27. 4. 1950 74
438 Ill Impala 15. 3. 1997 27
439 Robot Batman Roundup 25. 12. 1981 42
440 Victorious Vole 7. 8. 1982 42
( Položky: 421 - 440 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;
}