I am creating a new Gridview via ajax and add data to the new grid via ajax. The problem comes up when I try and refresh it with $.fn.yiiGridView.update, I get a settings undefined error. I have done some digging and have some code examples below.
main view
<div class="projects">
<?php $this->renderPartial('_manageProjects',$model->search()); ?>
</div>
<div id="schedule_container">
</div>
I then have some javascript that is run when a row is selected, it run’s the following ajax
echo CHtml::ajax( array(
'type'=> 'post',
'url'=> CController::createUrl('projects/displaySchedule'),
'data' => 'js:data',
'update' => '#schedule_container'
));
The ‘projects/displaySchedule’ renders a partialview containing a CGridViw. If I then run $.fn.yiiGridView.update the application crashes with the error
settings is undefined
gridview/jquery.yiigridview.js Line 203
I have tried a million different things but can’t seem to get it working. Has anyone else had a similar problem and been able to find a work around?