Id Name Status Action
921 Pathetic Assault on the Oregon Trail
922 Real Catapult Training
923 Tame Turtle
924 French Zombie Revenge
925 Tame Tern
926 Metal Mafia Palace
927 Bored Bat
928 Sleepy Shark
929 Exuberant Eagle
930 Excited Eland
931 Evil Elephant
932 Sleepy Skunk
933 Morbidly Obese Pokemon Melee
934 Robot Horse Racing Overdrive
935 Friendly Finch
936 Fierce Falcon
937 Uptight Unicorn
938 Foolish Fox
939 Double Biplane Mansion
940 Nihilistic Mushroom Havoc
( Items: 921 - 940 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;
}