Id Name Birthday Action
381 Blue-eyed Bug 5. 10. 1977
382 Revenge of Chicken Explosion 14. 3. 1971
383 Dirty Sushi Warfare 2. 1. 1988
384 Disney Unicycle Superstar 9. 4. 1970
385 Xenophobic Xenomorph 21. 5. 1978
386 Drab Dragonfly 25. 5. 1941
387 Sore Snake 10. 1. 1977
388 Surprise Stick All-Stars 25. 7. 1941
389 Musical Racing Spies 4. 2. 1952
390 Radical Zamboni Agent 3. 6. 1930
391 Bright Beetle 15. 5. 1992
392 The Sims: Shaving Punch-Out!! 6. 1. 1967
393 Ultraviolent Karate Remix 26. 6. 1990
394 Glamorous Gerenuk 5. 7. 1972
395 Sid Meier Rollerball Heroes 26. 2. 1933
396 Naughty Newt 22. 7. 1996
397 Mr. Alligator 95 25. 2. 1972
398 Beautiful Bear 7. 11. 1941
399 Difficult Dove 11. 2. 1932
400 Determined Dragonfly 18. 9. 1988
( Items: 381 - 400 from 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->setItemsDetail();

	$grid->setTemplateFile(__DIR__ . '/Templates/grid/item-detail-grid.latte');

	return $grid;
}