Clistview Inside Clistview

Hi,

If I have a CListView inside a CListView and click the pagination on the inside CListView both ‘afterAjaxUpdate’ are executed.

Also, one weird thing is that sometimes it executes the ‘afterAjaxUpdate’ of the insider first and others the outsider.

Is there a way to prevent this?

Thanks for all your help.

Hi

Did you set the same id both of two Clistview ?

Also there are similar posts that may help you.

http://www.yiiframework.com/forum/index.php/topic/43929-force-afterajaxupdate/

http://www.yiiframework.com/forum/index.php/topic/10284-afterajaxupdate-property-in-cgridview/

http://www.yiiframework.com/wiki/185/clistview-ajax-filtering/

http://www.yiiframework.com/forum/index.php/topic/39946-how-to-update-the-clistview-after-deletion-of-record-using-ajax-request/

No, they have different IDs.

Also,

All my JS and ajax requests work ok but if I do:


$.fn.yiiListView.update('listViewID');

they stop working, and I don’t know why I don’t even get any errors on firebug.

The JS and the ajax also stops working if I do the update using the firebug console.

Did you have the app online to post a link ?

Thanks for your help. I fix my problem. Some JS code missing.

But now I have another question:

When I update a empty listview with:




$.fn.yiiListView.update('listviewID');



I get this error: TypeError: settings is undefined

How can I fix this?

Found the problem but no solution.

The listview is received via ajax so the settings for that listview are not set.

Is there some way of solving this?

Can someone please check if this is correct:

if I have a CListView inside another CListView if I change the page of the inside CListView why does it makes 2 ajax requests? one for the outside CListView and another for the inside one

Thanks.

Found the problem.

It’s the “updateSelector”, if you don’t set it it’s going to be something like “#listViewID .pagination a, #listViewID .sorter a”, soo if you have another CListView inside this first this selector will also affect the inner CListView.