Poradi ikon u akce v ublaboo/datagrid
- martin28
- Člen | 40
Ahoj, nemohu prijit na to jak urcit poradi ikon v gridu:-(
$grid = $this->gridFactory->create();
$grid->setPrimaryKey("id");
$grid->setDataSource($this->xxxx->getItems();
$grid->getInlineEdit()->onCustomRedraw[] = function() use ($grid) {
$grid->redrawControl();
};
$grid->addColumnText("vaha","vaha");
$grid->addColumnText("sirka","sirka");
$grid->addInlineEdit()
->setTitle('Edit')
->onControlAdd[] = function($container){
$container->addText('vaha','vaha')->setHtmlType('number');
$container->addText('sirka','sirka')->setHtmlType('number');
};
$grid->addInlineAdd()
->setTitle('Add')
->onControlAdd[] = function($container){
$container->addText('vaha','')->setHtmlType('number');
$container->addText('sirka','')->setHtmlType('number');
};
$grid->getInlineEdit()->onSetDefaults[] = function($container,$item){
$container->setDefaults([
'vaha' => $item["vaha"],
'sirka' => $item["sirka"],
]);
};
$grid->getInlineEdit()->onSubmit[] = function($id, $values){
..........
};
$grid->getInlineAdd()->onSubmit[] = function($values){
...............
};
//$grid->getInlineEdit()->setShowNonEditingColumns();
$grid->addAction('delete', '', 'delete!')
->setTitle('Smazat')
->setClass('text-black-50');
Takto vse funguje ok, jen ikonka akce delete je na prvnim ja bych chtel aby byla az nakonci (za edit) kde prosim toto urcuji? Dekuji Martin
- Kamil Valenta
- Člen | 822
Toto jsem kdysi také hledal a nakonec jsem se smířil s tím, že to asi
nejde (leda to přepozicovat v css).
Bylo by ale fajn, kdyby to šlo. Co na to @PavelJanda ?