Id Jméno Narozky Věk
361 Sleepy Seal 24. 3. 1939 85
362 Allied Shopping Kingdom 1. 4. 1998 26
363 Deranged Sailor Brothers 23. 11. 1937 87
364 Tactical Barbarian - The Card Game 1. 2. 1971 53
365 Aero Jetski Assault 6. 11. 1942 82
366 Frisky Bongo Spectacular 22. 5. 1942 82
367 Smoggy Skylark 10. 2. 1982 42
368 Android Shadow Syndrome 21. 7. 1995 29
369 Death-Defying Basketball Troopers 21. 7. 1970 54
370 Fine Flamingo 17. 7. 1961 63
371 Gleaming Grasshopper 16. 4. 1942 82
372 Frail Fish 25. 4. 2000 24
373 Cthulhu Amish Fiesta 27. 2. 1937 87
374 Helpless Hare 6. 8. 1998 26
375 Clumsy Crayfish 8. 12. 1981 42
376 Brave Boar 1. 5. 1934 90
377 Atomic Cyborg Conflict 27. 5. 1963 61
378 Vivacious Vicuña 5. 7. 1951 73
379 Nasty Nightingale 5. 6. 1977 47
380 Testy Teira 1. 4. 1933 91
( Položky: 361 - 380 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;
}