I am getting the following exception when trying to ok the value in x-editable. [Exception... "" nsresult: "0x805e0006 ()" location: "JS frame :: :: .send :: line 8400" data: no]
View Code:
<?php $this->widget('bootstrap.widgets.TbGridView', array(
'id' => 'subjectgrid',
'itemsCssClass' => 'table-bordered items',
'dataProvider' => new CActiveDataProvider('Examschedule',array(
'criteria'=>array('condition'=>"examcode=:newexam and sessioncode=:sessioncode",
'params'=>array(':newexam'=>$examcode, ':sessioncode'=>$sessioncode),),
'pagination'=>array('pageSize'=>15),)),
'columns'=>array(
array('name' => 'examcode', 'headerHtmlOptions' => array('style' => 'width: 10px'),),
array('name' => 'sessioncode', 'headerHtmlOptions' => array('style' => 'width: 10px'),),
array('name' => 'subjectcode', 'headerHtmlOptions' => array('style' => 'width: 10px'),),
array('name' => 'groupcode', 'headerHtmlOptions' => array('style' => 'width: 10px'), ),
array('class' => 'editable.EditableColumn', 'name' => 'dateofexam', 'headerHtmlOptions' => array('style' => 'width: 10px'),
'editable' => array('type' => 'date', 'viewformat' => 'dd-mm-yyyy',
'url' => 'Yii::app()->createUrl("examschedule/update",array("examcode"=>$examcode, "sessioncode"=>$sessioncode, "subjectcode"=>$data->subjectcode))',
'placement' => 'right',) ),
array('class' => 'editable.EditableColumn','name' => 'sitting', 'headerHtmlOptions' => array('style' => 'width: 10px'),
'editable' => array('type' => 'select', 'source'=>array('1'=>'First Sitting', '2'=>'Second Sitting'),
'url' => 'Yii::app()->createUrl("examschedule/update",array("examcode"=>$examcode, "sessioncode"=>$sessioncode, "subjectcode"=>$data->subjectcode))',
'placement' => 'right', ) ),
),
));
?>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…