CGridView with ajax links

Hi,

I’m using a CGridView with ajax links to add and update records through a popup form.

I have a "create new" link that uses javascript to show a form where the user can create a new record. When the user click the "save" link in this form, the form is closed and the CGridView is updated with the new record.

In the last column of the CGridView, I have added an CHtml::ajaxLink to open the form again, allowing the user to update the record. The problem is that this update link doesn’t work with records that have just been added. If I refresh the page (the records are saved in session), the update link works fine.

I’ve read something about ajax links not working when they’re created through ajax itself, but these problems seems to be already fixed in version 1.1.6.

Anyone knows anything I can do so that my update link will work through ajax, without reloading the whole page again?

Take a look at this wiki.

Awesome. I’m trying to convert my form to use this CJuiDialog.

Thank you very much.

If you want to have this code generated for you, check gtc.