Id Name Birthday Action
241 Long Lapwing 19. 5. 1953
242 Aero Shopping Unit 22. 2. 1971
243 Prickly Panda 3. 11. 1937
244 Screaming Conga Train 28. 8. 1964
245 Smiling Shark 14. 5. 1983
246 Fair Fowl 24. 9. 1956
247 Dizzy Dog 25. 6. 1969
248 Sid Meier Sandwich Studio 3. 7. 1972
249 Obsessive-Compulsive Pony Desperadoes 11. 3. 2000
250 Master Chief Stapler Ultra 25. 2. 1996
251 Unremarkable Stick Struggle 28. 5. 1942
252 Brain-Damaged Cannibal Rider 5. 1. 1960
253 Agreeable Anteater 7. 5. 1974
254 In Search of Office Exhibition 6. 7. 1998
255 Encouraging Echidna 2. 2. 1975
256 Ashamed Aardvark 11. 12. 1961
257 Prickly Puffin 11. 2. 1994
258 Brave Bee 7. 10. 1985
259 Joyous Jellyfish 10. 8. 1970
260 Anxious Addax 19. 6. 1956
( Items: 241 - 260 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;
}