Clistview And Ajax

Hi everybody!

I would like to do a Master-Detail with CListView, the detail of each master should be hide or showed depending on an user click action.

It must be something like this:

where you see a link “Mostrar / Ocultar Descripcion” and it’s hide or show the specific detail for each master.

Could someone tell me some advise? some example in some web? I have been looking for something similar without success. I know it can be done with JQuery, but again… I don’t know how to implement it with Yii, although my idea it’s to try with Ajax in order to not load unnecessary information and only do it for an user action.

Any suggestion would be a huge help!


Here’s a wiki on that.

Dynamic parent and child CGridView on single view. Using $.ajax to update child gridview via controller, after row in parent gridview was clicked.

Well, It’s a little too long and heavy for a quick try, but it’s a complete guide. In other words, what you are seeking is not that simple and easy.

The wiki deals with CGridView, but it’s relatively easy to replace them with CListViews.