I had an issue with Yii subgrid, when i add some data and submit the page. The page reloads and after that when i check the subgrid it is not listing the data i actually added there, i had this issue only with IE 9. In all other browsers like Chrome, Firefox it works perfect.
Am not sure why it happens so i clear the cache and checked but still having that issue. And i noticed that the issue is because IE it is not calling the ajax to load that subgrid once the whole site is refreshed. Any one please help me to sort this issue..
Here is the code:
index.php
<div class="span9 search-results">
<?php
/* @var $this CVController */
$this->breadcrumbs = array(
'C V',
);
$flashMessages = Yii::app()->user->getFlashes();
$gridDataProvider = new CArrayDataProvider($cvs, array(
'keyField' => 'id',
'sort' => array('attributes' => array('name'),), 'pagination' => array('pageSize' => 20)
));
$user = Yii::app()->user;
if ($user->accessFeature()) {
$this->widget('bootstrap.widgets.TbButton', array(
'label' => Yii::t('main', 'ADD_CV'),
'type' => 'secondary',
'size' => 'small',
'url' => Yii::app()->controller->createUrl("cV/addHeader")
));
?> <?php
$this->widget('bootstrap.widgets.TbButton', array(
'label' => Yii::t('main', 'CV_LIST'),
'type' => 'secondary',
'size' => 'small',
'url' => Yii::app()->controller->createUrl("list/index")
));
?> <?php
$this->widget('bootstrap.widgets.TbButton', array(
'label' => Yii::t('main', 'ARCHIVED_CV_LIST'),
'type' => 'secondary',
'size' => 'small',
'url' => Yii::app()->controller->createUrl("list/showArchiveCv")
));
}
$gridColumns = array(
array(
'name' => 'name',
'class' => 'bootstrap.widgets.TbRelationalColumn',
'url' => $this->createUrl('interviewProcess/getScheduledInterviews'),
'header' => Yii::t('main', 'CANDIDATE_NAME'),
),
array(
'name' => 'clname',
'header' => Yii::t('main', 'COUNTRY'),
'value' => '$data["city"] != "" ? $data["clname"].", ".$data["city"] : $data["clname"]',
),
array(
'name' => 'header_availability',
'header' => Yii::t('main', 'AVAILABILITY'),
),
array(
'name' => 'header_cv_verified',
'header' => Yii::t('main', 'VERIFIED_LABEL'),
'value' => '$data["header_cv_verified"] == 1 ? "' . Yii::t('main', 'VERIFIED_LABEL') . '" : "' . Yii::t('main', 'NOT_VERIFIED_LABEL') . '"',
'type' => 'raw',
'cssClassExpression' => '$data["header_cv_verified"] == 1 ? "verified" : "notverified"',
),
array(
'htmlOptions' => array('nowrap' => 'nowrap'),
'template' => '{view} {download}{file_download}',
'class' => 'bootstrap.widgets.TbButtonColumn',
'viewButtonUrl' => "Yii::app()->controller->createUrl('preview/cv',array('id'=> " . '$data' . "['id']))",
'buttons' => array(
'download' => array(
'label' => Yii::t('main', 'BRIDGE_CV_DOWNLOAD'),
'url' => "Yii::app()->controller->createUrl('preview/createPdf',array('id'=> " . '$data' . "['id']))",
'icon' => 'icon-download'
),
'file_download' => array(
'label' => Yii::t('main', 'CV_DOWNLOAD'),
'url' => "Yii::app()->controller->createUrl('downloadCv',array('id'=> " . '$data' . "['id']))",
'icon' => 'icon-download-alt'
),
),
),
array(
'htmlOptions' => array('data-toggle' => 'modal', 'data-target' => '#setInterviewForm'),
'template' => '{set_interview}',
'class' => 'bootstrap.widgets.TbButtonColumn',
'buttons' => array(
'set_interview' => array(
'label' => Yii::t('main', 'SET_INTERVIEW'),
'icon' => 'th-list',
'class' => "btn btn-small",
'data-target' => "#setInterviewForm",
'url' => "Yii::app()->controller->createUrl('interviewProcess/index',array('id'=> " . '$data' . "['id']))",
'data-toggle' => "modal",
),
),
),
array(
'htmlOptions' => array('data-toggle' => 'modal', 'data-target' => '#addCandidateDescription'),
'template' => '{verify}',
'class' => 'bootstrap.widgets.TbButtonColumn',
'buttons' => array(
'verify' => array(
'label' => Yii::t('main', 'VERIFY_THIS_CANDIDATE'),
'visible' => 'CandidateInterviewSkillRate::model()->checkIfVerifyable($data)',
'url' => "Yii::app()->controller->createUrl('interviewProcess/index',array('id'=> " . '$data' . "['id']))",
'data-target' => "#addCandidateDescription",
'data-toggle' => "modal",
'class' => "btn btn-small",
'icon' => 'ok',
),
)
)
);
//Yii booster to show the CV list
?>
<div id="result_div">
<?php
$this->widget('bootstrap.widgets.TbGridView', array(
'type' => 'striped bordered',
'dataProvider' => $gridDataProvider,
'template' => "{items}",
'responsiveTable' => true,
'columns' => $gridColumns,
));
?>
</div>
</div>
getScheduledInterviews.php
<?php
$gridColumns = array(
array(
'name' => 'interview_type',
'header' => Yii::t('main', 'INTERVIEW_TYPE'),
'value' => array($this, 'getInterviewType'),
),
array(
'name' => 'interviewers',
'header' => Yii::t('main', 'INTERVIEWERS'),
'value' =>array($this, 'getInterviewers'),
),
array(
'name' => 'interview_date',
'header' => Yii::t('main', 'INTERVIEW_DATE_TIME'),
'value' =>array($this, 'getInterviewDate'),
),
array(
'htmlOptions' => array('nowrap' => 'nowrap'),
'template' => '{delete}{success}{view_rating}',
'class' => 'bootstrap.widgets.TbButtonColumn',
//'deleteButtonUrl' => "Yii::app()->controller->createUrl('interviewProcess/delete',array('id'=> " . '$data' . "['id']))",
'buttons' => array(
'delete' => array(
'label'=>Yii::t('main', 'DELETE_INTERVIEW'),
'visible' => 'InterviewProcessController::checkInterviewStatus($data,1)',
'icon' => 'icon-trash',
'url' => "Yii::app()->controller->createUrl('interviewProcess/delete',array('id'=> " . '$data' . "['id']))",
),
'success' => array(
'label'=>Yii::t('main', 'INTERVIEW_COMPLETED'),
'visible' => 'InterviewProcessController::checkInterviewStatus($data,2)',
'icon' => 'icon-ok',
'url' => "Yii::app()->controller->createUrl('interviewProcess/completed',array('id'=> " . '$data' . "['id']))",
),
'view_rating' => array(
'label'=>Yii::t('main', 'VIEW_RATING'),
'visible' => 'InterviewProcessController::checkInterviewStatus($data,3)',
'icon' => 'icon-star',
'url' => "Yii::app()->controller->createUrl('interviewProcess/viewrating',array('id'=> " . '$data' . "['interview_schedules_id']))",
),
),
),
);
?>
<?php
$this->widget('bootstrap.widgets.TbGridView', array(
'id' => 'interview-list-' . $_GET['id'],
'type' => 'striped bordered',
'enableSorting' => false,
'dataProvider' => $interviews,
'template' => "{items}{pager}",
'responsiveTable' => true,
'columns' => $gridColumns,
));
?>