Difference between #229 and #230 of
Yii v2 snippet guide

Revision #230 has been created by rackycz on Aug 21, 2020, 9:35:05 PM with the memo:

typo
« previous (#229) next (#231) »

Changes

Title unchanged

Yii v2 snippet guide

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
<?= $form->field($model, 'id_currency')->dropDownList($currencies) ?>
```

Note: In other views you will need models with predefined relations to reach the correct value. Relations can be created using GII (when they are defined in DB) or [manually](https://www.yiiframework.com/doc/guide/2.0/en/db-active-record#relational-data).

**GridVie
vw - Variable page size**
---
GridView cannot display DropDownList which could be used by the user to change the number of rows per page. You have to add it manually like this:

When you are creating a new model using Gii, you can select if you want to create the SearchModel as well. Do it, it is usefull for example in this situation. Then add following rows to the model:
[...]
7 0
4 followers
Viewed: 274 921 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: a year ago
Update Article

Revisions

View all history