Hi,
I’m trying to update a div after an ajax call on a CGridView. Am I calling the updateSelector & ajaxUpdate properties correctly?
After a manual page reload, the correct message is displayed. Is the updateSelector property fired onClick or when the it receives a response from the controller?
Thanks,
Matt
<div id="adminPanel">
<?php $this->widget('NotificationWidget'); ?>
<?php
$this->widget('zii.widgets.grid.CGridView', array(
'id' => 'user-grid',
'dataProvider' => $model->search(),
'filter' => $model,
'ajaxUpdate' => 'adminPanel',
'updateSelector' => '.emailLink',
'columns' => array(
array(
'type' => 'raw',
'value' => 'CHtml::ajaxLink(
"Send Email Validation",
Yii::app()->createUrl("admin/user/email"),
array( // ajaxOptions
"type" => "POST",
"data" => array("id" => $data->id),
),
array( //htmlOptions
"href" => Yii::app()->createUrl("admin/user/email", array("id" => $data->id)),
"class" => "emailLink",
)
)'
),
),
)); ?>
</div>