Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add enum column #847

Closed
sahifedp opened this issue Oct 29, 2018 · 0 comments
Closed

add enum column #847

sahifedp opened this issue Oct 29, 2018 · 0 comments

Comments

@sahifedp
Copy link

sahifedp commented Oct 29, 2018

please add enum columns to handle more than two status in grid view
I use trntv/EnumColumn for now :
https://github.com/yii2-starter-kit/yii2-starter-kit/blob/master/common/grid/EnumColumn.php
with this syntax:

 [
     'class' => \common\grid\EnumColumn::className(),
     'attribute' => 'status',
     'enum' => [ 
             '0' => 'unknown',
             'F' => 'Female',
            'M' => 'Male',
     ]
 ]

but it is good that kartik/grid has ownself.
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants