Yii Framework Forum: Update Banyak Data - Yii Framework Forum

Jump to content

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

Update Banyak Data Update data dengan Checklist Rate Topic: -----

#1 User is offline   vena 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 21-February 13

Posted 01 May 2013 - 08:23 PM

Para master mau tanya
bagaimana caranya membuat approval pakai CCheckBoxColumn
di view saya seperti ini
<?php
$form = $this->beginWidget('CActiveForm', array(
'id' => 'lihat1-form',
'action' => array('pengusulan/update1'),
'enableAjaxValidation' => true,
));
$this->widget('bootstrap.widgets.TbGridView', array(
'type'=>'striped bordered condensed',
'dataProvider'=>$dataProvider,
'selectableRows' => 2,
'enablePagination' => true,
'columns'=>array(
array(
'class' => 'CCheckBoxColumn',
'id' => 'selectedIds',
),
array(
'name'=>'ID Pengusul',
'value'=>'$data["idpengusulan"]',
),
array(
'name'=>'NIK',
'value'=>'$data["nik"]',
),
array(
'name'=>'Waktu Pengusulan',
'value'=>'$data["tanggal"]',
),
array(
'name'=>'Barang Usulan',
'value'=>'$data["idbarang"]',
),
array(
'name'=>'Jumlah',
'value'=>'$data["jumlah"]',
),
array(
'name'=>'Unit Pengusul',
'value'=>'$data["nomorunit"]',
),
),
));
echo CHtml::submitButton('Approve', array('name' => 'OK'));
$this->endWidget();
?>



Sedangkan dicontrollernya
public function actionUpdate1()
{

if (isset($_POST['OK']))
{
if (isset($_POST['selectedIds']))
{
foreach ($_POST['selectedIds'] as $id)
{
$model = $this->loadModel($id);
$model->validate1 = '1';
$model->update(array('validate1'));
}

}
}
}

tapi ada error The requested page does not exist.
Mohon bantuannya
0

#2 User is offline   rhigel 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 18-April 13

Posted 02 May 2013 - 07:13 AM

dipakein tag donk kodenya, biar enak bacanya ::)
0

#3 User is offline   vena 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 21-February 13

Posted 02 May 2013 - 04:19 PM

ok lain kali gunain tag, tapi udah bisa kok, terima kasih..:)
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