Introduction: This is a detailed page for modifying the pagesize of the gridview. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 341057 'rolling = 'no'>
You can use the following three methods:
1. View
1 |
<Span style ="Color: #000000 ;">$ Provider=$ Model-> Search (); |
2 |
$ Provider-> Pagination-> pagesize = 20; |
3 |
$ This-> Widget ('Zii. Widgets. Grid. cgridview',Array( |
5 |
'Dataprovider'=>$ Provider, </Span> |
2. In the search method of the model
01 |
Return New Cactivedataprovider (get_class ($ This),Array( |
03 |
'Critera'=>$ Criteria, |
3. In the Controller
View Source
Print?
01 |
$ Dataprovider=New Cactivedataprovider ('Post',Array( |
05 |
'Pagesize'=> Yii: APP ()-> Params ['Postsperpage'], |
09 |
'Critera'=>$ Criteria, |
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/341057.html pageno: 7.