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).
**GridVievw - 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:[...]