Id Name Status Action
121 Revenge of the Kabuki in the Bayou
122 Telekinetic Police from Hell
123 Allied Racing 25th Anniversary Edition
124 Rockin' Fun from Mars
125 Relieved Ray
126 Ho-Hum Pogo Annihilation
127 Inappropriate Furry Roundup
128 Blasphemous Fishing Man
129 Pixellated Kart Fighter
130 Hilarious Herring
131 Irritating Boxing Runner
132 Repulsive Rhinoceros
133 Cautious Corncrake
134 Orbital Jungle Legend
135 Subatomic Goth Stadium
136 Crazy Cowfish
137 Anxious Albatross
138 Elegant Emu
139 Spectacular Shadow Returns
140 The Robot in Middle-Earth
( Items: 121 - 140 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;
}