Id Name Birthday Age
941 Jack Thompson Hang Glider Sisters 6. 6. 1940 83
942 Jolly Jackal 1. 8. 1964 59
943 Bad Bat 25. 10. 1959 64
944 Real Rook 3. 2. 1971 53
945 Ingenious Programming Domination 23. 11. 1965 58
946 Musical Paintball Punishment 8. 8. 1985 38
947 Japanese Boxing Knights 25. 11. 1952 71
948 Distinct Dormouse 15. 8. 1967 56
949 Upset Unicorn 20. 10. 1981 42
950 Testy Tapir 4. 1. 1934 90
951 Final Sunshine Dash 8. 2. 1931 93
952 Innocent Impala 8. 2. 1961 63
953 Puzzled Penguin 11. 1. 1961 63
954 Fair Falcon 1. 9. 1968 55
955 Jolly Jellyfish 11. 8. 1946 77
956 Famous Fly 28. 8. 1988 35
957 Tender Tarsier 10. 7. 1941 82
958 Gentle Goosander 1. 12. 1972 51
959 The Last Karaoke from Mars 15. 4. 1975 49
960 Unsightly Unicorn 23. 2. 1963 61
( Items: 941 - 960 from 1000 )
  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(function (Row $row): int {
			return $row['birth_date']->diff(new DateTime())->y;
		});

	return $grid;
}