Id Name Status Action
781 Xenophobic Xenomorph
782 Expensive Eel
783 French Chess in Crazyland
784 Enthusiastic Eland
785 The Secret Weapon of the Workout Joe
786 Britney Spears' Cricket Horror
787 Nihilistic Baseball Yoga
788 Blazing Ostrich - Hot Pursuit
789 Irish Kung-fu World Tour
790 Claustrophobic Zamboni Hero
791 Ultimate Motocross Interceptor
792 Calm Cormorant
793 Awful Antelope
794 Tired Tortoise
795 Exciting Afro Conspiracy
796 Yellowed Yak
797 Proud Pheasant
798 Frightened Frog
799 Dead or Alive Gun Online
800 Day of the Lawnmower Creator
( Items: 781 - 800 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;
}