{parts/gtag_head.html}
{parts/gtag_body.html}| No meu caso, especificamente, eu tenho várias colunas de valores, e preciso apresentar subtotais conforme um agrupamento, e um total geral no final da datagrid. |
| Importante lembrar que estou me baseando noutra postagem. |
| https://adiantiframework.com.br/forum/view_5432 |
| Aqui serão mostrados os trechos mais relevantes : |
| <?php |
| // Definir a configuracao do agrupamento |
| $this->datagrid->setGroupColumn('tipo', "<b style='color:red'><i>{tipo_descricao}</i></b>"); |
| // Comentar a linha |
| // $this->datagrid->datatable = 'true'; |
| ?> |
| No método onReload, na parte onde os itens são adicionados nada datagrid |
| <?php |
| public function onReload() |
| // ... diversos comandos do onreaload |
| // Quando chegar aqui, fazer assim |
| $limit = $criteria->getProperty('limit'); |
| // load the objects according to criteria |
| $objects = $repository->load($criteria, FALSE); |
| if (is_callable($this->transformCallback)) |
| { |
| call_user_func($this->transformCallback, $objects, $param); |
| } |
| $this->datagrid->clear(); |
| if ($objects) |
| { |
| ?> |
| <?php |
| function totalizador($titulo,$total) |
| { |
| $row = $this->datagrid->addItem($it); |
| $row->get(1)->colspan = 2; |
| // $row->del($row->get(0)); //deletar coluna de ações // nao funcionou comigo |
| } |
| ?> |
| <?php |
| public function escondeBotao($param) |