Dear All,
After I display search result on the page and click second page I am loosing search criteria. Is there any way to carry search criteria to other pages ?
Dear All,
After I display search result on the page and click second page I am loosing search criteria. Is there any way to carry search criteria to other pages ?
You have to include the datagrid in the form of search criteria, and change CLinkPager in order to create submitbutton instead of normal buttons.
This can be done extending CLinkPager and overriding the method createPageButtons().
Maybe this helps you: http://www.ramirezcobos.com/2010/10/04/how-to-create-a-custom-pagination-widget-for-yii-framework/
Antonia,
I couldn’t download files in your link. Is it possible to give site.call JS function
Zaccaria,
What is datagrid exactly?
By the way I just create a new class call PostPager extends from CLinkPager and update the createPageButton function like
return '<li class="'.$class.'">'.CHtml::link($label,'javascript:goPage('.($page+1).')').'</li>';
So it is calling goPage function and this function submits the form. So I can able to get the search criteria in this way.
Nice solution, thank for sharing.
In effect datagrid doesn’t mean nothing, I don’t know what I was thinking when I answred you… sorry!
I meant to change the Pager of CDataGrid, as yo did it.
thanks