getData não retorna valores do Datagrid Olá pessoal, preciso de uma ajuda, copiei aqui mesmo do forum um exemplo para gerar Parcelamento de títulos (https://www.adianti.com.br/forum/pt/view_1630?simulacao-de-financiamento) autor Flavio Maidl, fiz algumas adequações para meu uso, porém não estou conseguindo pegar os valores do datagrid na Action do boão Confirmar, usando $data = $this->form->getData();, porém não retorna os va...
RA
getData não retorna valores do Datagrid  
Olá pessoal, preciso de uma ajuda, copiei aqui mesmo do forum um exemplo para gerar Parcelamento de títulos (https://www.adianti.com.br/forum/pt/view_1630?simulacao-de-financiamento) autor Flavio Maidl, fiz algumas adequações para meu uso, porém não estou conseguindo pegar os valores do datagrid na Action do boão Confirmar, usando $data = $this->form->getData();, porém não retorna os valores da datagrid;

Segue codigo:
 
  1. <?php
  2. class geradorFinaciamentos extends TWindow {
  3. protected $form;
  4. private $datagrid;
  5. use Adianti\base\AdiantiStandardListTrait;
  6. public function __construct($param) {
  7. parent::__construct();
  8. $this->setDatabase('gecom'); // defines the database
  9. $this->setActiveRecord('Contas'); // defines the active record
  10. $this->setDefaultOrder('id', 'asc'); // defines the default order
  11. $this->form = new TForm('form_Vencimentos');
  12. // $this->setTitle('Simulador de Parcelamento');
  13. $Clientes_id = new TDBUniqueSearch('Clientes_id', 'gecom', 'Clientes', 'id', 'CLI_NOME');
  14. $Clientes_id->setSize('100%');
  15. $Planoct_id = new TDBUniqueSearch('Planoct_id', 'gecom', 'Planoct', 'id', 'PLA_DESCRICAO');
  16. $Planoct_id->setMask('{PLA_DESCRICAO} - ({id})');
  17. $Planoct_id->setSize('100%');
  18. $this->form->add(new TLabel('<b>Cliente/Fornecedor:</b>'));
  19. $this->form->add($Clientes_id);
  20. $this->form->add(new TLabel('<b>Plano de Contas::</b>'));
  21. $this->form->add($Planoct_id);
  22. $Historico = new TEntry('Historico');
  23. $Historico->setSize('100%');
  24. $this->form->add(new TLabel('Histórico:'));
  25. $this->form->add($Historico);
  26. $Dias = new TNumeric(2, ',', '.', true);
  27. $Dias->setValue(30);
  28. $Dias->setSize('20%');
  29. // with: 500, height: automatic
  30. // parent::setSize(0.4, 0.7); // use 0.6, 0.4 (for relative sizes 60%, 40%)
  31. $texto = new TEntry('texto');
  32. $texto->setSize('40%');
  33. // $texto->setValue('1');
  34. $venci = new TDate('venci');
  35. $venci->setSize('30%');
  36. $total = new TEntry('total');
  37. $doc = new TEntry('doc');
  38. // $titulo = new TLabel('<font color = blue>Simulador de Parcelas</font');
  39. // $this->label = new TLabel('Resultado');
  40. $this->vtotal = new TLabel('-');
  41. $botao = TButton::create('testar', array($this, 'onTeste'), 'Simular parcelamento', 'fa:eye green');
  42. $confirmar = TButton::create('confirmar', array($this, 'onConfirmar'), 'Confirmar', 'fa:check green');
  43. $Dias->popover = 'true';
  44. $Dias->poptitle = '<font color = blue /><b>Nº de dias de intervalo entre as parcelas.</b>';
  45. $texto->popover = 'true';
  46. $texto->poptitle = '<font color = blue /><b>Quantidade de Parcelas.</b>';
  47. $botao->popover = 'true';
  48. $botao->poptitle = '<font color = red /><b>SIMULAR PARCELAMENTO</b>';
  49. $botao->popcontent = '<font color = blue>Simula o parcelamento, deixando parcelas com valor exato e calculando vencimentos.</font>';
  50. $venci->setMask('dd/mm/yyyy');
  51. $this->form->add(new TLabel('Data Base: '));
  52. $this->form->add($venci);
  53. $this->form->add(new TLabel('Intervalo:'));
  54. $this->form->add($Dias);
  55. $this->form->add('<br>');
  56. $this->form->add(new TLabel('Documento:'));
  57. $this->form->add($doc);
  58. $this->form->add('<br>');
  59. $this->form->add(new TLabel('Parcelas:'));
  60. $this->form->add($texto);
  61. $this->form->add('<br>');
  62. $this->form->add(new TLabel('Valor: '));
  63. $this->form->add($total);
  64. $this->form->add('<br>');
  65. $this->form->add($botao);
  66. $this->form->add($confirmar);
  67. // creates one datagrid
  68. $this->datagrid = new BootstrapDatagridWrapper(new TDataGrid);
  69. $this->datagrid->setHeight(320);
  70. $this->datagrid->style = 'width: 100%';
  71. $this->form->add($this->datagrid);
  72. $col_parcela = new TDataGridColumn('CON_PARCELA','Parcela', 'left');
  73. $col_doc = new TDataGridColumn('CON_DOCUMENTO','Documento', 'center');
  74. $col_vencto = new TDataGridColumn('CON_VENCTO','Vencimento', 'left');
  75. $col_valor = new TDataGridColumn('CON_VALOR', 'Valor', 'right');
  76. $this->datagrid->addColumn($col_parcela);
  77. $this->datagrid->addColumn($col_doc);
  78. $this->datagrid->addColumn($col_vencto);
  79. $this->datagrid->addColumn($col_valor);
  80. $this->form->setFields(array($Clientes_id,$Historico, $texto,$doc, $venci, $botao, $confirmar, $total));
  81. $this->datagrid->createModel();
  82. $container = new TVBox;
  83. $container->style = 'width: 90%';
  84. $container->add($this->form);
  85. parent::add($container);
  86. }
  87. function onTeste() {
  88. $data = $this->form->getData();
  89. $date = TDate::date2us(date($data->venci));
  90. $date = new DateTime( $date );
  91. $vezes = (double) str_replace(['.', ','], ['', '.'], $data->texto);
  92. $total = (double) str_replace(['.', ','], ['', '.'], $data->total);
  93. $valor = ($total / $vezes);
  94. $this->datagrid->clear();
  95. for ($n=1; $n<=$vezes; $n++)
  96. {
  97. $date->add(new DateInterval('P1M')); //'P1M'
  98. //echo $date->format('Y-m-d');
  99. //echo "n";
  100. $nueba = $nueba . $date->format('Y-m-d').';';
  101. //echo $nueba;
  102. }
  103. $binda = explode(';', $nueba);
  104. $NumerodeParcelas = $data->texto;
  105. $Documento = $data->doc;
  106. if(substr($data->total, -3, 1) == ',') {
  107. $data->total = substr_replace($data->total, '.', -3, 1);
  108. }
  109. // joga o valor total informado na var $ValordaCompra
  110. $ValordaCompra = $data->total;
  111. //desta forma se obtem o valor das parcelas desprezando os centavos
  112. $Parcelas = floor($ValordaCompra/$NumerodeParcelas);
  113. //obtendo o valor da primeira parcela
  114. $PrimeiraParcela = $ValordaCompra-($Parcelas*($NumerodeParcelas-1));
  115. echo "<br/><br/>";
  116. for ($y = 1; $y<=$vezes; $y++)
  117. {
  118. $x = $y;
  119. $x -= 1;
  120. // while($y <= $vezes) {
  121. // cria a classe standard para armazenar os resultados
  122. $item = new StdClass;
  123. $item->CON_VENCTO = TDate::date2br($binda[$x]);
  124. $item->CON_PARCELA = $y;
  125. $item->CON_DOCUMENTO = $Documento;
  126. // se for a primeira parcela exibe a var $PrimeiraParcela
  127. if($y == 1){
  128. $item->CON_VALOR = number_format($PrimeiraParcela,2,",",".");
  129. } else { // se não for a 1º parcela exibe o valor de $Parcelas
  130. $item->CON_VALOR = number_format($Parcelas,2,",",".");
  131. }
  132. $this->datagrid->addItem($item);
  133. // }
  134. }
  135. // soma as parcelas alteradas
  136. $totala = ($Parcelas*($NumerodeParcelas-1)) + $PrimeiraParcela;
  137. $cacaca = number_format($totala,2,",",".");
  138. //$data->texto = 'texto para o label';
  139. // $this->label->setValue('<br/>Dividido em '.$data->texto.' vezes de R$ '.number_format($valor,2,",",".") . '<br/>');
  140. $this->form->setData($data);
  141. // exibe as parcelas
  142. $this->vtotal->setValue('<br/> TOTAL: R$<b> '.number_format($totala,2,",",".").'</b>');
  143. // libera as variáveis da memória
  144. // TSession::setValue('dados',$this->datagrid);
  145. unset($totala);
  146. unset($cacaca);
  147. unset($valor);
  148. // unset($data);
  149. unset($date);
  150. unset($item);
  151. unset($doc);
  152. unset($ValordaCompra);
  153. }
  154. public function onReload()
  155. {
  156. // $this->datagrid->clear();
  157. }
  158. public function onConfirmar($param)
  159. {
  160. try
  161. {
  162. TTransaction::open('gecom'); // open a transaction
  163. /**
  164. // Enable Debug logger for SQL operations inside the transaction
  165. TTransaction::setLogger(new TLoggerSTD); // standard output
  166. TTransaction::setLogger(new TLoggerTXT('log.txt')); // file
  167. **/
  168. $this->form->validate(); // validate form data
  169. $data = $this->form->getData(); // get form data as array
  170. // $this->form->setData($data);
  171. var_dump($data);
  172. $object = new Contas; // create an empty object
  173. $object->fromArray( (array) $data); // load the object with data
  174. $object->store(); // save the object
  175. // get the generated id
  176. $data->id = $object->id;
  177. $this->form->setData($data); // fill form data
  178. TTransaction::close(); // close the transaction
  179. new TMessage('info', 'Titulos Gravados.');
  180. }
  181. catch (Exception $e) // in case of exception
  182. {
  183. new TMessage('error', $e->getMessage()); // shows the exception error message
  184. $this->form->setData( $this->form->getData() ); // keep form data
  185. TTransaction::rollback(); // undo all pending operations
  186. }
  187. }
  188. function show()
  189. {
  190. $this->onReload();
  191. parent::show();
  192. }
  193. }
  194. ?>


segue também o var_dump($data);

object(stdClass)[107] public 'Clientes_id' => string '1350' (length=4) public 'Historico' => string 'meu historico' (length=13) public 'texto' => string '3' (length=1) public 'doc' => string 'GTY' (length=3) public 'venci' => string '23/04/2020' (length=10) public 'total' => string '2569' (length=4)





Curso Dominando o Adianti Framework

O material mais completo de treinamento do Framework.
Curso em vídeo aulas + Livro completo + Códigos fontes do projeto ERPHouse.
Conteúdo Atualizado!


Dominando o Adianti Framework Quero me inscrever agora!

Comentários (9)


NR

O post de formulário no html só retorna o valor de campos. Pelo que vi não há nenhum campo em sua grid, somente labels.

Mas se os dados da grid são só pra visualização mesmo, sem possibilidade de alteração, você pode recriar os dados da parcela na função onConfirmar.

Outra opção é usar a função generateHiddenFields da datagrid. Nesse caso não dá pra usar a função getData, vai ter que pegar as informações através de $param. Tem um mestre x detalhe que trabalha dessa maneira:
https://adianti.com.br/framework_files/tutor/index.php?class=SaleForm
RA

Nataniel Rabaioli, seguinte a sua dica com generateHiddenFields mas mesmo assim em no var_dump em param só retorna

'class' => string 'geradorFinaciamentos' (length=20) 'method' => string 'onConfirmar' (length=11) 'Clientes_id' => string '51' (length=2) 'Planoct_id' => string '' (length=0) 'Historico' => string 'meu hist' (length=8) 'venci' => string '23/04/2020' (length=10) 2 => string '' (length=0) 'doc' => string 'J9987VB' (length=7) 'texto' => string '3' (length=1) 'total' => string '5897' (length=4)


na grid setei a configuração
 
  1. <?php
  2. $this->datagrid = new BootstrapDatagridWrapper(new TDataGrid);
  3. $this->datagrid->setId('titulos_list');
  4. $this->datagrid->generateHiddenFields(); // -> Dica Nataniel
  5. $this->datagrid->setHeight(320);
  6. $this->datagrid->style = 'width: 100%';
  7. $this->form->add($this->datagrid);
  8. ?>
RA

..Complementando.

Não teria que colocar em setFields o datagrid, se for isso, não consegui fazer.

 
  1. <?php
  2. $this->form->setFields(array($Clientes_id,$Historico, $texto,$doc, $venci, $botao, $confirmar, $total));
  3. ?>
NR

Não precisa colocar no setFields. Só acrescentei o generateHiddenFields e funcionou. Lembrando que deve clicar no "Simular parcelamento" antes, pois a grid precisa estar populada. O retorno foi o seguinte:
 
  1. <?php
  2. array(14) {
  3. ["class"]=>
  4. string(20) "geradorFinaciamentos"
  5. ["method"]=>
  6. string(11) "onConfirmar"
  7. ["Clientes_id"]=>
  8. string(1) "3"
  9. ["Planoct_id"]=>
  10. string(0) ""
  11. ["Historico"]=>
  12. string(6) "123123"
  13. ["venci"]=>
  14. string(10) "23/04/2020"
  15. [2]=>
  16. string(0) ""
  17. ["doc"]=>
  18. string(6) "213321"
  19. ["texto"]=>
  20. string(1) "5"
  21. ["total"]=>
  22. string(4) "1000"
  23. ["parcelas_CON_PARCELA"]=>
  24. array(5) {
  25. [0]=>
  26. string(1) "1"
  27. [1]=>
  28. string(1) "2"
  29. [2]=>
  30. string(1) "3"
  31. [3]=>
  32. string(1) "4"
  33. [4]=>
  34. string(1) "5"
  35. }
  36. ["parcelas_CON_DOCUMENTO"]=>
  37. array(5) {
  38. [0]=>
  39. string(6) "213321"
  40. [1]=>
  41. string(6) "213321"
  42. [2]=>
  43. string(6) "213321"
  44. [3]=>
  45. string(6) "213321"
  46. [4]=>
  47. string(6) "213321"
  48. }
  49. ["parcelas_CON_VENCTO"]=>
  50. array(5) {
  51. [0]=>
  52. string(10) "23/05/2020"
  53. [1]=>
  54. string(10) "23/06/2020"
  55. [2]=>
  56. string(10) "23/07/2020"
  57. [3]=>
  58. string(10) "23/08/2020"
  59. [4]=>
  60. string(10) "23/09/2020"
  61. }
  62. ["parcelas_CON_VALOR"]=>
  63. array(5) {
  64. [0]=>
  65. string(6) "200,00"
  66. [1]=>
  67. string(6) "200,00"
  68. [2]=>
  69. string(6) "200,00"
  70. [3]=>
  71. string(6) "200,00"
  72. [4]=>
  73. string(6) "200,00"
  74. }
  75. }
  76. ?>
RA

Nataniel, vc pegou este retorno na Action do botão Confirmar ,


public function onConfirmar($param)
{
....
var_dump($param)

foi aqui ?

NR

Sim, na função onConfirmar
RA

Obrigado pela ajuda Nataniel, mas aqui não consegui pegar esse array no retorno de jeito nenhum, só retorna mesmo a parte do setfield do formulário, poderia postar seu codigo para compração :
NR

 
  1. <?php
  2. class geradorFinaciamentos extends TWindow {
  3. protected $form;
  4. private $datagrid;
  5. use Adianti\base\AdiantiStandardListTrait;
  6. public function __construct($param) {
  7. parent::__construct();
  8. $this->setDatabase('permission'); // defines the database
  9. $this->setActiveRecord('SystemProgram'); // defines the active record
  10. $this->setDefaultOrder('id', 'asc'); // defines the default order
  11. $this->form = new TForm('form_Vencimentos');
  12. // $this->setTitle('Simulador de Parcelamento');
  13. $Clientes_id = new TDBUniqueSearch('Clientes_id', 'permission', 'SystemProgram', 'id', 'name');
  14. $Clientes_id->setSize('100%');
  15. $Planoct_id = new TDBUniqueSearch('Planoct_id', 'permission', 'SystemProgram', 'id', 'name');
  16. $Planoct_id->setMask('{name} - ({id})');
  17. $Planoct_id->setSize('100%');
  18. $this->form->add(new TLabel('<b>Cliente/Fornecedor:</b>'));
  19. $this->form->add($Clientes_id);
  20. $this->form->add(new TLabel('<b>Plano de Contas::</b>'));
  21. $this->form->add($Planoct_id);
  22. $Historico = new TEntry('Historico');
  23. $Historico->setSize('100%');
  24. $this->form->add(new TLabel('Histórico:'));
  25. $this->form->add($Historico);
  26. $Dias = new TNumeric(2, ',', '.', true);
  27. $Dias->setValue(30);
  28. $Dias->setSize('20%');
  29. // with: 500, height: automatic
  30. // parent::setSize(0.4, 0.7); // use 0.6, 0.4 (for relative sizes 60%, 40%)
  31. $texto = new TEntry('texto');
  32. $texto->setSize('40%');
  33. // $texto->setValue('1');
  34. $venci = new TDate('venci');
  35. $venci->setSize('30%');
  36. $total = new TEntry('total');
  37. $doc = new TEntry('doc');
  38. // $titulo = new TLabel('<font color = blue>Simulador de Parcelas</font');
  39. // $this->label = new TLabel('Resultado');
  40. $this->vtotal = new TLabel('-');
  41. $botao = TButton::create('testar', array($this, 'onTeste'), 'Simular parcelamento', 'fa:eye green');
  42. $confirmar = TButton::create('confirmar', array($this, 'onConfirmar'), 'Confirmar', 'fa:check green');
  43. $Dias->popover = 'true';
  44. $Dias->poptitle = '<font color = blue /><b>Nº de dias de intervalo entre as parcelas.</b>';
  45. $texto->popover = 'true';
  46. $texto->poptitle = '<font color = blue /><b>Quantidade de Parcelas.</b>';
  47. $botao->popover = 'true';
  48. $botao->poptitle = '<font color = red /><b>SIMULAR PARCELAMENTO</b>';
  49. $botao->popcontent = '<font color = blue>Simula o parcelamento, deixando parcelas com valor exato e calculando vencimentos.</font>';
  50. $venci->setMask('dd/mm/yyyy');
  51. $this->form->add(new TLabel('Data Base: '));
  52. $this->form->add($venci);
  53. $this->form->add(new TLabel('Intervalo:'));
  54. $this->form->add($Dias);
  55. $this->form->add('<br>');
  56. $this->form->add(new TLabel('Documento:'));
  57. $this->form->add($doc);
  58. $this->form->add('<br>');
  59. $this->form->add(new TLabel('Parcelas:'));
  60. $this->form->add($texto);
  61. $this->form->add('<br>');
  62. $this->form->add(new TLabel('Valor: '));
  63. $this->form->add($total);
  64. $this->form->add('<br>');
  65. $this->form->add($botao);
  66. $this->form->add($confirmar);
  67. // creates one datagrid
  68. $this->datagrid = new BootstrapDatagridWrapper(new TDataGrid);
  69. $this->datagrid->setHeight(320);
  70. $this->datagrid->style = 'width: 100%';
  71. $this->datagrid->setId('parcelas');
  72. $this->datagrid->generateHiddenFields();
  73. $this->form->add($this->datagrid);
  74. $col_parcela = new TDataGridColumn('CON_PARCELA','Parcela', 'left');
  75. $col_doc = new TDataGridColumn('CON_DOCUMENTO','Documento', 'center');
  76. $col_vencto = new TDataGridColumn('CON_VENCTO','Vencimento', 'left');
  77. $col_valor = new TDataGridColumn('CON_VALOR', 'Valor', 'right');
  78. $this->datagrid->addColumn($col_parcela);
  79. $this->datagrid->addColumn($col_doc);
  80. $this->datagrid->addColumn($col_vencto);
  81. $this->datagrid->addColumn($col_valor);
  82. $this->form->setFields(array($Clientes_id,$Historico, $texto,$doc, $venci, $botao, $confirmar, $total));
  83. $this->datagrid->createModel();
  84. $container = new TVBox;
  85. $container->style = 'width: 90%';
  86. $container->add($this->form);
  87. parent::add($container);
  88. }
  89. function onTeste() {
  90. $data = $this->form->getData();
  91. $date = TDate::date2us(date($data->venci));
  92. $date = new DateTime( $date );
  93. $vezes = (double) str_replace(['.', ','], ['', '.'], $data->texto);
  94. $total = (double) str_replace(['.', ','], ['', '.'], $data->total);
  95. $valor = ($total / $vezes);
  96. $this->datagrid->clear();
  97. for ($n=1; $n<=$vezes; $n++)
  98. {
  99. $date->add(new DateInterval('P1M')); //'P1M'
  100. //echo $date->format('Y-m-d');
  101. //echo "n";
  102. $nueba = $nueba . $date->format('Y-m-d').';';
  103. //echo $nueba;
  104. }
  105. $binda = explode(';', $nueba);
  106. $NumerodeParcelas = $data->texto;
  107. $Documento = $data->doc;
  108. if(substr($data->total, -3, 1) == ',') {
  109. $data->total = substr_replace($data->total, '.', -3, 1);
  110. }
  111. // joga o valor total informado na var $ValordaCompra
  112. $ValordaCompra = $data->total;
  113. //desta forma se obtem o valor das parcelas desprezando os centavos
  114. $Parcelas = floor($ValordaCompra/$NumerodeParcelas);
  115. //obtendo o valor da primeira parcela
  116. $PrimeiraParcela = $ValordaCompra-($Parcelas*($NumerodeParcelas-1));
  117. echo "<br/><br/>";
  118. for ($y = 1; $y<=$vezes; $y++)
  119. {
  120. $x = $y;
  121. $x -= 1;
  122. // while($y <= $vezes) {
  123. // cria a classe standard para armazenar os resultados
  124. $item = new StdClass;
  125. $item->CON_VENCTO = TDate::date2br($binda[$x]);
  126. $item->CON_PARCELA = $y;
  127. $item->CON_DOCUMENTO = $Documento;
  128. // se for a primeira parcela exibe a var $PrimeiraParcela
  129. if($y == 1){
  130. $item->CON_VALOR = number_format($PrimeiraParcela,2,",",".");
  131. } else { // se não for a 1º parcela exibe o valor de $Parcelas
  132. $item->CON_VALOR = number_format($Parcelas,2,",",".");
  133. }
  134. $this->datagrid->addItem($item);
  135. // }
  136. }
  137. // soma as parcelas alteradas
  138. $totala = ($Parcelas*($NumerodeParcelas-1)) + $PrimeiraParcela;
  139. $cacaca = number_format($totala,2,",",".");
  140. //$data->texto = 'texto para o label';
  141. // $this->label->setValue('<br/>Dividido em '.$data->texto.' vezes de R$ '.number_format($valor,2,",",".") . '<br/>');
  142. $this->form->setData($data);
  143. // exibe as parcelas
  144. $this->vtotal->setValue('<br/> TOTAL: R$<b> '.number_format($totala,2,",",".").'</b>');
  145. // libera as variáveis da memória
  146. // TSession::setValue('dados',$this->datagrid);
  147. unset($totala);
  148. unset($cacaca);
  149. unset($valor);
  150. // unset($data);
  151. unset($date);
  152. unset($item);
  153. unset($doc);
  154. unset($ValordaCompra);
  155. }
  156. public function onReload()
  157. {
  158. // $this->datagrid->clear();
  159. }
  160. public function onConfirmar($param)
  161. {
  162. try
  163. {
  164. TTransaction::open('permission'); // open a transaction
  165. var_dump($param);
  166. return;
  167. /**
  168. // Enable Debug logger for SQL operations inside the transaction
  169. TTransaction::setLogger(new TLoggerSTD); // standard output
  170. TTransaction::setLogger(new TLoggerTXT('log.txt')); // file
  171. **/
  172. $this->form->validate(); // validate form data
  173. $data = $this->form->getData(); // get form data as array
  174. // $this->form->setData($data);
  175. var_dump($data);
  176. $object = new Contas; // create an empty object
  177. $object->fromArray( (array) $data); // load the object with data
  178. $object->store(); // save the object
  179. // get the generated id
  180. $data->id = $object->id;
  181. $this->form->setData($data); // fill form data
  182. TTransaction::close(); // close the transaction
  183. new TMessage('info', 'Titulos Gravados.');
  184. }
  185. catch (Exception $e) // in case of exception
  186. {
  187. new TMessage('error', $e->getMessage()); // shows the exception error message
  188. $this->form->setData( $this->form->getData() ); // keep form data
  189. TTransaction::rollback(); // undo all pending operations
  190. }
  191. }
  192. function show()
  193. {
  194. $this->onReload();
  195. parent::show();
  196. }
  197. }
  198. ?>
</font></font></font></font>
RA

Nataniel obrigado pela paciência, olha só eu testei seu codigo aqui, mas aprece o seguinte

 
  1. <?php
  2. 'Adianti\Widget\Datagrid\TDataGrid' does not have a method 'generateHiddenFields' in C:\wamp\www\gnote\lib\adianti\wrapper\BootstrapDatagridWrapper.php on line 35
  3. ?>


Não tenho esse método na classe TDataGird generateHiddenFields, , uso o Studio 5.5.0