Cjuidialog Popup From Cjuigrid


I have been following a couple of topics here implementing an update of model from cgridview. I tried a hash of the codes posted but I seem to be missing something.

Objective: Update Date of model from CJuiGrid using a CJuiDialog.

CGridView Code


		$this->widget('zii.widgets.grid.CGridView', array(


		'columns'=> array(


                            'name'=>'Program Period',








                                        "success"=>"alert(\"Date Extended!\")",),

																	array)("onclick"=>"$(\"#extendDialog\").dialog(\"open\"); return false;"))'





       		'title'=>'Extend Date',










    	<iframe id="update-date" width="100%" height="100%" scrolling="no"></iframe>



Date Form

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(


	// Please note: When you enable ajax validation, make sure the corresponding

	// controller action is handling ajax validation correctly.

	// There is a call to performAjaxValidation() commented in generated controller code.

	// See class documentation of CActiveForm for details on this.


)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">

		<?php echo $form->labelEx($model,'reg_enddate'); ?>

		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(











		        'value'=>'Please insert date',




		<?php echo $form->error($model,'reg_enddate'); ?>


	<div class="row buttons">

		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>


<?php $this->endWidget(); ?>

</div><!-- form -->

Controller Code

public function actionDateUpdate()


		$model = $this->loadModel($_GET['reg_number']);



			$model->attributes = $_POST['Reg'];


			if ($model->save())






The current code brings up a blank CJuiDialog without any fields for entry. I tried another iteration with CButtonColumn. This time it did bring a CJuiDialog successfully with a ‘dateUpdate’ form but the CJuiDatePicker seems to be inactive and it resulted in a manual date entry.

I’m not quite sure what is currently wrong with the current code. It might be an ajax issue but any form of help will be most appreciated.