This is great…Got it working… Thanks a lot for the help…
…
Is it possible to make the pop-up stay ?
I mean i am using a Cgridview in the Cuidialog pop-up… The grid view has sorting and pagination. Although the sorting and pagination works, the pop-up closes as soon as i click on sorting/pagination. when i reopen the pop-up the values are sorted accordingly.
So can i do stop the click function to reload the page?
My view for the pop-up is :
<?php
$pageSize=Yii::app()->user->getState('pageSize',Yii::app()->params['defaultPageSize']);
// we use header of button column for the drop down
$widget = $this->widget('zii.widgets.grid.CGridView', array(
'id' => 'healthcareproviders-grid',
'cssFile' => Yii::app()->baseUrl . '/css/gridview_staffmanagement.css',
'dataProvider' => $model2->healthcareprovidersList(),
'enablePagination' => true,
'ajaxUpdate' => true,
'emptyText' => 'No results found.',
'template' => '{items}',
'pager' => array(
'class' => 'LinkPager',
'cssFile' => false,
'header' => '',
'firstPageLabel' => '',
'prevPageLabel' => '<img class="next-btn">',
'nextPageLabel' => '<img class="previous-btn">',
'lastPageLabel' => '',
),
'columns' => array(
array(
'name' => 'id',
'type' => 'raw',
'htmlOptions' => array('class' => 'width40'),
'headerHtmlOptions'=>array('class' => 'width50-12 list-heading-row'),
'header' => 'S/N',
'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)',
),
array(
'name' => 'name',
'type' => 'raw',
'htmlOptions'=> array('class'=>'width200'),
'headerHtmlOptions'=>array('class' => 'width200'),
'header' => 'Name',
'value' => '$data->name',
),
array(
'name' => 'type',
'type' => 'raw',
'htmlOptions'=> array('class'=>'width150'),
'headerHtmlOptions'=>array('class' => 'width150'),
'header' => 'Service',
'value' => '$data->type',
),
array(
'name' => 'category',
'type' => 'raw',
'htmlOptions'=> array('class'=>'width150'),
'headerHtmlOptions'=>array('class' => 'width150'),
'header' => 'Category',
'value' => '$data->category',
),
array(
'name' => 'sub_category',
'type' => 'raw',
'htmlOptions'=> array('class'=>'width150'),
'headerHtmlOptions'=>array('class' => 'width150'),
'header' => 'Sub Category',
'value' => '$data->sub_category',
),
array(
'class' => 'CButtonColumn',
'header' => '',
'htmlOptions' => array('class' => 'width100'),
'headerHtmlOptions'=>array('class' => 'width100'),
// 'template' => '<a class="profile-edit-btn" href="/isml/source/portal/index.php/user/editweblink" title="Click to edit web link"></a><a class="delete-btn" href="#" title="Click to delete web link"></a>',
// 'buttons' => array(),
'template' => '{edit}',
'buttons' => array(
'edit' => array(
'label'=>'', // text label of the button
'url'=>'Yii::app()->createUrl("user/healthcareprovider", array("id"=>$data->mob_organisationId))', // the PHP expression for generating the URL of the button
'visible' => '$data->mob_organisationId',
'options'=>array('class'=>'profile-edit-btn'), // HTML options for the button tag
),
),
),
),));
?>
I am thinking this is possible , but i just dont know how to…