Id Name Birthday Action
961 Happy Blood Extravaganza 22. 10. 1936
962 Frankenstein Toon Explorer 13. 7. 1942
963 Maniac Vocabulary Inspector 22. 3. 1981
964 College Alien Task Force 24. 3. 1955
965 Shiny Shrike 12. 4. 1935
966 Healthy Horse 19. 11. 1935
967 Misty Manatee 1. 11. 1959
968 Disney Night Conflict 11. 4. 1930
969 Blazing Jackhammer Crusader 23. 5. 1986
970 Victorious Vendace 18. 3. 1985
971 Panzer Gun Bandits 16. 4. 1956
972 Fierce Frog 3. 4. 1989
973 Bling Bling Skate Crusader 24. 10. 1991
974 Average Albatross 22. 7. 1941
975 Twisted Deer Hunter Posse 6. 1. 1985
976 Intellectual Spelling Warfare 27. 10. 1942
977 Exquisite Quiz Roundup 12. 6. 1970
978 All-Star Bible Kid 24. 6. 1930
979 Mysterious Monkey 2. 8. 1952
980 Curious Capybara 5. 5. 1930
( Items: 961 - 980 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;
}