Id Name Birthday Action
901 Zany Zebra 17. 1. 1973
902 Jamaican Walrus Corps 7. 5. 1984
903 Outrageous Osprey 1. 5. 1946
904 Better Boar 10. 4. 1978
905 Disgusted Dunlin 17. 11. 1974
906 Disgusted Dingo 8. 10. 1938
907 Cheerful Cormorant 19. 2. 1971
908 Trendy Bubble Camp 27. 12. 1931
909 Sinister Fighter Romp 18. 8. 1967
910 Ugliest Unicorn 28. 10. 1950
911 Grumpy Gerbil 28. 11. 1949
912 Fatal Kitchen Master 22. 1. 1946
913 Ugliest Unicorn 7. 12. 1989
914 Bizarro Spork Melee 12. 7. 1982
915 Quaint Quetzal 12. 9. 1976
916 Good Guanaco 7. 5. 1994
917 Italian Burger in Vegas 11. 6. 1945
918 Fruity Chase Quiz 2. 4. 1981
919 Pleasant Penguin 12. 5. 1983
920 Telekinetic Hillbilly Odyssey 27. 8. 1950
( Items: 901 - 920 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;
}