Yii Framework Forum: Passar atributos da GridView Via Post - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Passar atributos da GridView Via Post Rate Topic: -----

#1 User is offline   Rafael Christófano 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 13-January 17

Posted 21 February 2017 - 03:32 PM

Olá pessoal, tenho uma gridview com checkboxColumn. Essa GridView está dentro de um form e preciso que ao postar o form, os atributos selecionados na gridview seja encaminhados via POST.

SEGUE O CODIGO...

<?php $form = ActiveForm::begin(); ?>

<?=Html::submitButton('Send', ['class' => 'btn btn-info',]);?>

<?=GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,

'columns' => [
['class' => 'yii\grid\CheckboxColumn'],

'attribute' =>'idpecas',
'attribute' =>'descricao',
'attribute' =>'preco_custo',
'attribute' => 'preco_venda',
'value' => function($model){
return Html::textInput('', $model->preco_venda);
},
'format' => 'raw'
],
['class' => 'yii\grid\ActionColumn',
'template' => ''],
],
]); ?>


<?= Html::endForm();?>

Como faço para a view receber os dados da GridView e exibir??

Obrigado
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users