How to call a gridview in a modal on update button click.?


(Er_Avinash) #1

i have created a action (History), after click. modal should be open …?


(Alexander Makarov) #2

Question isn’t clear. Please elaborate.


(Er_Avinash) #3


(Er_Avinash) #4

i want to call a modal on history button…and i have created a history page page same like this…that page should call on this modal…


(Er_Avinash) #5

here is my code …of history button…
[
‘class’ => ‘CButtonColumn’,
‘template’=>’{newbutton}’,
‘buttons’=>[
‘newbutton’=>[
‘label’=>’<button class=“btn btn-success” >history</button>’,

‘url’=>‘Yii::app()->createAbsoluteUrl("/audit/auditReport/history/$data->primaryKey")’,
‘options’ => [‘target’ => ‘_blank’],
],
],

],

and here is my _history page code…

$this->widget(‘zii.widgets.grid.CGridView’,[

‘id’=>‘audit-grid’,
‘dataProvider’ => $model->search(),
‘filter’ => $model,
‘pager’ => array(‘header’=>’’,‘htmlOptions’=>array(‘class’=>‘pagination’)),
‘pagerCssClass’ => ‘pagination pull-left’,

‘columns’ => [

[
‘name’=>‘id’
],
[
‘header’ => ‘ReportBillingID’,
‘name’ => ‘report_billing_id’
],
[
‘header’ =>‘Date Of Cart’,
‘name’=>‘idate’,
// ‘value’=>’$data->idate’,
],

[
‘header’ =>‘Aircart ID’,
‘name’=>‘doc_nos’,
‘value’ => ‘CHtml::link($data->doc_nos,
Yii::app()->createUrl(“airCart/view”,array(“id”=>$data->doc_nos)),array(“target” => “_blank”))’,
‘type’ => ‘raw’,
],
[
‘header’ =>‘Sector’,
‘name’=>‘sector’
],

[
‘header’ =>‘Booking Status’,
‘name’=>‘doc_srno’,
‘value’ => ‘$data->doc_srno’,
],
[
‘header’ =>‘DOM/INT’,
‘name’=>‘idm_flag’,
‘value’=>’$data->idm_flag’,
],

[
‘header’ =>‘Number of passenger’,
‘name’=>‘nos_pax_a’,
],
[
‘header’ =>‘PNR Number’,
‘name’=>‘pnr_no’
],
[
‘header’ => ‘Ticket Number’,
‘name’ => ‘ticket_no’,
],

[
‘header’ => ‘Tax1’,
‘name’ => ‘tax1’,
‘value’=>’$data->tax1’
],
[
‘header’ => ‘Tax2’,
‘name’ => ‘tax2’,
‘value’=>’$data->tax2’
],

],
]);

this page should call on history button…
and table is also different …i have created a history table …


(Er_Avinash) #6

sorry…but …i m still trying to solve this…plzz…suggest me …
:no_mouth: