Difference between #208 and #209 of
Yii v2 snippet guide

Revision #209 has been created by rackycz on Jul 3, 2020, 12:47:50 PM with the memo:

GridViev - Variable page size
« previous (#208) next (#210) »

Changes

Title unchanged

Yii v2 snippet guide

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
class InvoiceSearch extends Invoice
{
public $pageSize = null // add this row
// ...

  // This method already exists:
 
public function rules()
{
return [ // ...
[...]
}

// This
functionmethod already exists, so change it: public function search($params) { // ..Remember to call load() first and then you can work with pageSize
$this->load($params);

// Add following rows:
if (!isset($this->pageSize)) {
// Here we make sure that the dropDownLst will have correct value preselected
[...]
7 0
4 followers
Viewed: 256 704 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: 6 months ago
Update Article

Revisions

View all history