Id Name Status Action
761 Vivacious Vendace
762 Grotesque Gannet
763 Doubtful Deer
764 Grieving Grouse
765 Insane Rugby of Might and Magic
766 Unpleasant Volleyball Caper
767 Heavy Chase Explosion
768 Friendly Fish
769 Lost Puzzle Voyage
770 The Six Million Dollar Sniper Tycoon
771 Enchanting Echidna
772 BudgetSoft Presents: Plumber Train
773 Future Quiz Desperadoes
774 Psycho Banana Overlords
775 Thankful Teira
776 College Dance Siege
777 Rich Reindeer
778 Heroic Graveyard Fiesta
779 Annoyed Anteater
780 Confused Cheetah
( Items: 761 - 780 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;
}