Id Name Status Action
101 Elite Grizzly Bear Insanity
102 Legendary Yak in Africa
103 Testy Tiger
104 Professional Cheese Trivia
105 Thoughtful Teira
106 Unstoppable Transvestite Country
107 Blue-eyed Barracuda
108 Motionless Macaw
109 Mighty Helicopter Special Edition
110 Mystical Volleyball Dudes
111 Neon Driving Squadron
112 Lazy Locust
113 Luigi Quantum Freak
114 Profane Buddhist Dystopia
115 Elegant Bowling Fight
116 Delightful Duck
117 Bizarre Kangaroo - 2nd Impact
118 Creepy Cicada
119 Transvestite Plumber Feud
120 Ugly Unicorn
( Items: 101 - 120 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]);

	$grid->addColumnNumber('id', 'Id')
		->setAlign('start')
		->setFilterText();

	$grid->addColumnText('name', 'Name')
		->setFilterText();

	$grid->addColumnStatus('status', 'Status');

	$inlineAdd = $grid->addInlineAdd();

	$inlineAdd->setPositionTop()->onControlAdd[] = function ($container): void {
		$container->addText('name', '')
			->setRequired('aaa');
		$container->addText('birth_date', '');
		$container->addText('link', '');
		$container->addSelect('status', '', [
			'active' => 'Active',
			'inactive' => 'Inactive',
			'deleted' => 'Deleted',
		]);
	};

	$inlineAdd->onSubmit[] = function ($values): void {
		$this->dibiConnection->insert(
			'users',
			[
				'name' => $values['name'],
				'status' => $values['status'],
				'countries_visited' => 1,
				'birth_date' => new DateTime(),
			]
		)->execute();
		$this->flashMessage('Record was added!', 'success');
		$this->redrawControl('flashes');
	};

	return $grid;
}